gRPC Web Go client
Easy to use, compatibles with generated client by protoc-gen-go-grpc
.
Stream, grpc-web-text is not supported now.
This is fork of https://github.com/ktr0731/grpc-web-go-client
Usage: (full example: examples/main.go)
dial, _ := grpcweb.Dial(addr, grpcweb.WithInsecure())
client := helloworld.NewGreeterClient(dial) // compatible with normal grpc-go code!
res, _ := client.SayHello(context.Background(), &helloworld.HelloRequest{Name: "hello"})
How to run on your machine
Common environment variables.
export ENVOY_ADMIN_PORT=8001
export GRPC_PORT=8002
export GRPC_WEB_PORT=8003
Run the following in another terminal.
ENVOY_CONFIG=$(envsubst < examples/envoy.envsubst.yaml) && envoy --config-yaml $ENVOY_CONFIG
go run examples/server/main.go
go run examples/main.go