Categorygithub.com/stdll00/grpc-web-go-client
module
0.0.0-20240316144452-4ef8078b0ce3
Repository: https://github.com/stdll00/grpc-web-go-client.git
Documentation: pkg.go.dev

# README

gRPC Web Go client

GoDoc GitHub Actions

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

# Packages

No description provided by the author
No description provided by the author