Proposal
Generate REST client that implements native gRPC client interface.
Motivation
The generated API client is great. However, it is slightly different from the native gRPC client interface.
- grpc-gateway client interface:
// GreeterGatewayClient is the interface for Greeter service client.
type GreeterGatewayClient interface {
// Sends a greeting
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
type GreeterClient interface {
// Sends a greeting
SayHello(context.Context, *HelloRequest, ...grpc.CallOption) (*HelloReply, error)
}
If grpc-gateway client uses the same interface as native gRPC then it can be used as a drop-in replacement, making adoption much easier.
Proposal
Generate REST client that implements native gRPC client interface.
Motivation
The generated API client is great. However, it is slightly different from the native gRPC client interface.
If grpc-gateway client uses the same interface as native gRPC then it can be used as a drop-in replacement, making adoption much easier.