go-sdk/examples/grpc-service
Mike Nguyen 7c03c7ce58
chore: remove dapr stop steps and add appropriate timeouts (#573)
Signed-off-by: mikeee <hey@mike.ee>
2024-07-22 13:10:02 -07:00
..
client Add example for dapr grpc proxy mode (#414) 2023-06-06 12:00:37 +08:00
server Add example for dapr grpc proxy mode (#414) 2023-06-06 12:00:37 +08:00
README.md chore: remove dapr stop steps and add appropriate timeouts (#573) 2024-07-22 13:10:02 -07:00

README.md

Grpc Service Example with proxy mode

The examples/grpc-service folder contains a Dapr enabled server app and a client app that uses this SDK to invoke grpc methos via grpc stub, The server app is available as gRPC. The client app can target either one of these for service to service and binding invocations.

Step

Prepare

  • Dapr installed

Run server as a dapr app

dapr run --app-id grpc-server \
         --app-port 50051 \
         --app-protocol grpc \
         --dapr-grpc-port 50007 \
         go run ./server/main.go

Run grpc client

dapr run --app-id grpc-client \
         go run ./client/main.go

Cleanup

dapr stop --app-id grpc-server