Skip to content

Support GRPC in Go #50

@huan

Description

@huan

We are working on the Go Wechaty recently, so we will need to support the Go version of our GRPC stubs.

The generating part will be very similar to the TypeScript & Python version that we are already supported. see: @chatie/grpc@NPM & chatie-grpc@PyPI

However, there's a difference between the Go and TypeScript/Python: we need to store the generated Go stub source code in our repository, instead of published to a centralized package manager site.

This is because the designers of the Go do not like a central package manager, which will cause many problems. See: Using Go Modules

So let's design the Go support for our chatie/grpc, I believe it should:

  1. The go module should share the same proto buffer definition files from chatie/grpc repo, which means it should be put into the same DevOps process of our repo here.
  2. The go grpc generator script can be put at scripts/generate-stub-go.sh, like the Python scripts/generate-stub-py.sh as well.
  3. The require path of our chatie-grpc Go module should be: github.com/chatie/grpc/go/
  4. We should add a unit test to make sure the generated go stub version is matching our proto but file version.

This is just my initial version of the design, comments and suggestions are welcome, please feel free to start a discussion under this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions