https://github.com/stevenferrer/ping-http-grpc
Ping via HTTP and gRPC on the same port using cmux.
https://github.com/stevenferrer/ping-http-grpc
cmux golang grpc http
Last synced: 9 months ago
JSON representation
Ping via HTTP and gRPC on the same port using cmux.
- Host: GitHub
- URL: https://github.com/stevenferrer/ping-http-grpc
- Owner: stevenferrer
- License: mit
- Created: 2022-09-02T13:47:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T13:54:30.000Z (over 3 years ago)
- Last Synced: 2025-02-17T04:39:13.440Z (about 1 year ago)
- Topics: cmux, golang, grpc, http
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ping-http-grpc
Ping via HTTP and [gRPC](https://grpc.io) on the same port using [cmux](https://github.com/soheilhy/cmux).
## Running the examples
Run the server.
```sh
$ 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.
```sh
$ curl http://localhost:8080
pong
```
Ping gRPC.
```sh
$ go run cmd/pingclient/main.go
pong
```
## License
[MIT](./LICENSE)