Skip to content

cloudfly/go-grpc-gateway-client

Repository files navigation

go-grpc-gateway-client

The go-grpc-gateway-client is a high quality http client generator for gRPC services that are fronted by grpc-gateway.

Features

  • Strongly typed client interface.
  • Supports all gRPC features including streaming.
  • Supports all grpc-gateway features including custom query parameters, and request body.

Usage

  1. Install go-grpc-gateway-client:

    $ go install github.com/cloudfly/go-grpc-gateway-client/protoc-gen-go-grpc-gateway-client@latest
  2. Generate client code

outdir=service
BASEDIR=./
protoc -I $BASEDIR \
	-I $BASEDIR \
	--go_out=paths=source_relative:$outdir/service \
	--go-grpc_out=paths=source_relative:$outdir/service \
	--grpc-gateway_out=logtostderr=true,paths=source_relative:$outdir/service \
	--grpc-gateway-client_out=paths=source_relative:$outdir/service \
	${BASEDIR}/your_service.proto

See example for a complete example.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published