GRPC is a high-performance RPC framework that is built using protocol buffers (https://developers.google.com/protocol-buffers) and HTTP/2 (https://http2.github.io). Creating a GRPC client in Go involves many of the same intricacies as working with Go HTTP clients. In order to demonstrate basic client usage, it's easiest to also implement a server. This recipe will create a greeter service, which takes a greeting and a name and returns the sentence <greeting> <name>!. In addition, the server can specify whether to exclaim ! or not . (full stop).
There are some details about GRPC, such as streaming, that this recipe won't explore; however, it will hopefully serve as an introduction to creating a very basic server and client.
Getting ready
After completing the initial setup steps mentioned in the Technical requirements section at the beginning of this chapter, install GRPC (https://grpc.io/docs/quickstart/go...