- Create hello.proto inside the proto directory and define a service interface with the name Say, which has two datatypes—Request and Response, as follows:
syntax = "proto3";service Say { rpc Hello(Request) returns (Response) {}}message Request { string name = 1;}message Response { string msg = 1;}
- Compile hello.proto with the following command:
$ protoc --go_out=plugins=micro:. hello.proto