825 B
825 B
category |
---|
documentation |
Examples
Examples are available under examples
directory.
examplepb/echo_service.proto
,examplepb/a_bit_of_everything.proto
: service definitionexamplepb/echo_service.pb.go
,examplepb/a_bit_of_everything.pb.go
: [generated] stub of the serviceexamplepb/echo_service.pb.gw.go
,examplepb/a_bit_of_everything.pb.gw.go
: [generated] reverse proxy for the service
server/main.go
: service implementationmain.go
: entrypoint of the generated reverse proxy
To use the same port for custom HTTP handlers (e.g. serving swagger.json
), gRPC-gateway, and a gRPC server, see this code example by CoreOS (and its accompanying blog post)