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

Implementing RPC services

The gRPC framework leverages the stream multiplexing capabilities of HTTP/2 so that it can handle both synchronous and asynchronous RPCs. The protoc compiler, when invoked with the grpc plugin enabled, will generate the following:

  • Client and server interfaces for every RPC service definition in the compiled .proto file. For a service named Foo, the compiler will generate a FooServer and a FooClient interface. This is quite a useful feature as it allows us to inject mocked clients into our code at test time.
  • Complete client implementation for each service that adheres to the generated client interface.
  • A helper function to register our service implementation with a gRPC server instance. Once again, for a service ...
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