Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pepabo/protoc-gen-go-client

protoc-gen-go-client is a protoc plugin that generates a client that bundles gRPC clients for multiple services.
https://github.com/pepabo/protoc-gen-go-client

go golang protobuf protoc protoc-plugin protocol-buffers

Last synced: about 1 month ago
JSON representation

protoc-gen-go-client is a protoc plugin that generates a client that bundles gRPC clients for multiple services.

Awesome Lists containing this project

README

        

# protoc-gen-go-client

`protoc-gen-go-client` is a protoc plugin that generates a client that bundles gRPC Clients for multiple services.

## Example

Generate [client.go](example/gen/go/myapp/client.go) that bundles gRPC clients generated by proto files in [the directory](example/proto/myapp).

## Requirements

- `protoc-gen-go`
- `protoc-gen-go-grpc`

## Options

| Option | Type | Description |
| --- | --- | --- |
| `package` | string | Specify package name (ex `--go-client_opt=package=xxxx` ) |
| `same_package` | bool | Make the package the same as the package generated by proto-gen-go (ex `--go-client_opt=same_package` ) |
| `with_close` | bool | Add `Close()` method for closing *grpc.ClientConn from client |