https://github.com/thepatrik/hellogrpc
Command line utility to demonstrate a simple gRPC server and client setup.
https://github.com/thepatrik/hellogrpc
go golang grpc grpc-server protobuf
Last synced: 3 months ago
JSON representation
Command line utility to demonstrate a simple gRPC server and client setup.
- Host: GitHub
- URL: https://github.com/thepatrik/hellogrpc
- Owner: thepatrik
- License: mit
- Created: 2020-04-05T08:49:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T18:27:21.000Z (over 3 years ago)
- Last Synced: 2024-11-15T07:37:18.254Z (over 1 year ago)
- Topics: go, golang, grpc, grpc-server, protobuf
- Language: Go
- Homepage:
- Size: 173 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hellogrpc
[](https://travis-ci.org/thepatrik/hellogrpc) [](https://goreportcard.com/report/github.com/thepatrik/hellogrpc) [](https://godoc.org/github.com/thepatrik/hellogrpc)
Command line utility to demonstrate a simple gRPC server and client setup in golang. The gRPC server implements a function to mirror (reverse) a text, as well as a basic [health check](https://github.com/grpc/grpc-go/blob/master/health/grpc_health_v1/health.pb.go).
### Setup
Install with (requires [golang](https://golang.org/doc/install)):
```console
$ go install github.com/thepatrik/hellogrpc
```
### Usage
View usage help:
```console
$ hellogrpc --help
hellogrpc is a command line interface for testing gRPC in golang
Usage:
hellogrpc [command]
Available Commands:
help Help about any command
mirror Mirror text
serve Run gRPC server
Flags:
-h, --help help for hellogrpc
Use "hellogrpc [command] --help" for more information about a command.
```
Run a gRPC server (defaults to port 9090):
```console
$ hellogrpc serve
```
Run a gRPC client in another process:
```console
$ hellogrpc mirror
input: The quick brown 狐 jumped over the lazy 犬
output: 犬 yzal eht revo depmuj 狐 nworb kciuq ehT
```