While not mandatory, gRPC applications often leverage Protocol Buffers for service definitions and data serialization. All the services in Impulse uses version 3 of the protocol buffer language (proto3).
The protocol buffer compiler, protoc, is used to compile .proto files, which contain service and message definitions.
How to install protoc
Mac OS
Install Protocol buffer compiler, protoc
brew install protobuf
protoc --version # Ensure compiler version is 3+
Install Go plugins for the protocol compiler
cd ~
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
Update your PATH so that the protoc compiler can find the plugins:
export PATH="$PATH:$(go env GOPATH)/bin"
Compile .proto file
Regular Microservices (Depends on the go-grpc)
When compiling .proto files from a microservice it is important to notice there is a dependency with the go-grpc module, meaning, it needs to exist.