Chapter 11. Extending gRPC services
In this chapter we’re going to discuss how gRPC can be extended through additional tooling. For example, you may want to expose your gRPC server as a JSON API as well. Perhaps you want to write your own generator for .proto
files. All of these are possible with the extensibility built into gRPC and protobufs.
In this chapter we’re going to cover:
- JSON gateways to gRPC servers using the grpc-gateway tool
- Building your own protoc generator
- Adding custom options to messages, fields, services, and RPCs
These tools enable engineers to quickly add on business critical functionality that gRPC itself does not offer. We’ll go over some examples of how they can be used and some drawbacks.