- Golang Programming language
- protoc Protocol Buffer library
- grpcui UI to interact with gRPC server
- grpcurl Client to make gRPC server requests
- VSCode Golang extension
- VSCode Proto 3 extension
- protoc-gen-go protoc-gen-go is a plugin for the Google protocol buffer compiler to generate Go code.
- protoc-gen-go-grpc This tool generates Go language bindings of services in protobuf definition files for gRPC.
protoc \
--go_out=logger \
--go_opt=paths=source_relative \
--go-grpc_out=logger \
--go-grpc_opt=paths=source_relative \
logger.proto
- Generates
logger/logger_grpc.pb.go
withprotoc-gen-go-grpc
- Generates
logger/logger.pb.go
withprotoc-gen-go
go run main.go
grpcui \
-plaintext \
-use-reflection=false \
-proto=logger.proto \
localhost:8089
Visit localhost:8089 and send log messages to the server.
You can choose the different methods to execute
grpcurl \
-plaintext \
-use-reflection=false \
-proto=logger.proto \
-d '{"name": "app"}' \
localhost:8089 Logger.GetLogsByApp
Special thanks to @ossan-dev to the workshop in Nerdearla 2023