Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

grpc.echo

Listens on tcp port 7151 and will echo grpc message sent by client.

Requirements

Setup

To start the Docker Compose stack defined in the compose.yaml file, use:

docker compose up -d

Verify behavior

Unary Stream

Echo {"message":"Hello World"} message via unary rpc using grpcurl command.

grpcurl -plaintext -proto ./etc/protos/echo.proto -d '{"message":"Hello World"}' \
    localhost:7151 example.EchoService.EchoUnary

output:

{
  "message": "Hello World"
}

Bidirectional Stream

Echo messages via bidirectional streaming rpc.

grpcurl -plaintext -proto ./etc/protos/echo.proto -d @ \
    localhost:7151 example.EchoService.EchoBidiStream

Paste below message.

{
  "message": "Hello World"
}

Bench

ghz --config bench.json \
    --proto ./etc/protos/echo.proto \
    --call example.EchoService/EchoBidiStream \
    localhost:7151

Teardown

To remove any resources created by the Docker Compose stack, use:

docker compose down