Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Creating high-level clients for accessing data stores over gRPC

The protoc compiler, given the RPC definitions from the previous two sections as input, will generate a client and the required server stubs for the data store proxy service.

From the perspective of the API server, each RPC method is nothing more than a wrapper for invoking the similarly-named method of the underlying concrete store implementation that we configured the server to use. More specifically, to implement the RPC method called X, we perform the following steps:

  1. Convert the fields of the RPC's input message (where required) into the values expected by the wrapped method, X.
  2. Invoke X while watching out for any errors.
  1. Convert and pack the output of X into the appropriate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content