How it works...

The GRPC server is set up to listen on port 4444. Once the client connects, it can send requests and receive responses from the server. The structure of the requests, responses, and supported methods is dictated by the .proto file we created in step 4. In practice, when integrating against GRPC servers, they should provide the .proto file, which can be used to automatically generate a client.

In addition to the client, the protoc command generates the stubs for the server, and all that's required is to fill in the implementation details. The generated Go code also has JSON tags and the same structures could be reused for JSON REST services. Our code sets up an insecure client. To handle GRPC securely, you need to use an SSL certificate.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.150.163