In this tutorial, you’ll design a simple gRPC service with Goa. While Goa is often used for REST endpoints, it also has first-class support for gRPC transports. You’ll see how to:
- Define a service and methods in the Goa DSL.
- Annotate them for gRPC, ensuring the generated code produces
.proto
files. - Validate payloads and map errors to gRPC status codes.
What We’ll Build
We’ll create a greeter
service that has a single method called SayHello
.
The method receives a name in the payload and returns a greeting message. We’ll
also show how to qualify gRPC responses with standard gRPC codes.