Categorygithub.com/jbaojunior/grpc-test
module
0.0.1
Repository: https://github.com/jbaojunior/grpc-test.git
Documentation: pkg.go.dev

# README

GRPC Test

GRPC Test return server's hostname

GRPC Server

Env:
    PORT: Port to server do binding. Default is 5551.

Execute:

docker run -it --rm --name grpc-server -p 5551:5551 jbaojunior/grcp-test

GRPC Client

Env:
    SERVER_ADDRESS: Server Address. Default is 127.0.0.1
    SERVER_PORT: Server port. Default is 5551

Execute:

docker run -it --rm --name grpc-client jbaojunior/grpc-test grcp-client

If want do a looping to test some kind of LB:

docker run -it --rm --name grpc-client -e SERVER_ADDRESS=${SERVER_ADDRESS} --entrypoint /bin/bash jbaojunior/grpc-test -c 'while true; do /usr/local/bin/grpc-client; sleep 0.5; done'

Build docker

docker build . -t grpc-test

Update proto

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative proto/grpc-test.proto

Using https://grpc.io/docs/languages/go/quickstart and https://github.com/grpc/grpc-go as reference

# Packages

Package main implements a client for Greeter service.
Package main implements a server for Greeter service.
No description provided by the author