Building a gRPC client
Unlike JSON/HTTP services, gRPC services aren't easy for humans to interact with. They're really intended as machine-to-machine protocols, and so we must write a program if we wish to use them.
To help us do this, we are first going to add a new package inside our vault service called vault/client/grpc
. It will, given a gRPC client connection object that we get from Google's grpc
package, provide an object that performs the appropriate calls, encoding and decoding, for us, all hidden behind our own vault.Service
interface. So, we will be able to use the object as though it is just another implementation of our interface.
Create new folders inside vault so that you have the path of vault/client/grpc
. You can imagine adding ...
Get Go Programming Blueprints - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.