Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 473 Bytes

File metadata and controls

32 lines (22 loc) · 473 Bytes

ping-http-grpc

Ping via HTTP and gRPC on the same port using cmux.

Running the examples

Run the server.

$ go run cmd/server/main.go
2022/09/02 21:49:42 grpc server started.
2022/09/02 21:49:42 http server started.
2022/09/02 21:49:42 cmux started.

Ping via HTTP.

$ curl http://localhost:8080
pong

Ping gRPC.

$ go run cmd/pingclient/main.go
pong

License

MIT