This repository reproduces the example at https://connect.build/docs/go/getting-started for Dapr between connect-go and grpc-go implementations.
Prerequisites
- Docker
- Dapr
- Go 1.18+
dapr init
# Run the consul instance for discovery
./run-consul.sh
We're running consul as a replacement for mDNS which may not work correctly in all environment.
In a terminal, run either the grpc or connect server with dapr:
./run-grpc-server.sh
In a second terminal, run either the grpc or connect client with dapr:
./run-grpc-client.sh
The gzip compression issue happens when you use both connect-client and connect-server implementations.
The proto code was generated as such:
buf lint
buf generate
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
greet/v1/greet.proto