An example of gRPC services setup with envoy in the middle.
- front proxy with tls.
- plain proxy.
- internal service-to-service proxy.
- proxy with native gRPC health-check againts upstream clusters.
client <-> {plain, secure}.front (envoy) <-> greeter <-> internal (envoy) o<-> address.internal
|
`<-> bio.internal
Having docker installed and running in your machine,
$ git clone git@github.com:dio/simple-grpc.git
$ cd simple-grpc
$ make
in another tab,
$ pwd
/path/to/simple-grpc
$ make call rpc=hello
name: bar
address: bar
$ make call rpc=hellos
secure
name: bar
address: bar
Note: hellos
is a secure call of hello
.
.
|-- api
| |-- Dockerfile
| |-- core
| | `-- basic.proto
| |-- greeter
| | `-- hello.proto
| `-- people
| |-- address.proto
| `-- bio.proto
|-- cert
| |-- Dockerfile
| `-- gen.sh
|-- client
| |-- Dockerfile
| |-- hello
| | `-- hello.go
| |-- hellos
| | `-- hellos.go
| `-- keep
|-- envoy
| |-- front
| | |-- plain
| | | |-- Dockerfile
| | | `-- config.yaml
| | `-- secure
| | |-- Dockerfile
| | `-- config.yaml
| `-- internal
| |-- Dockerfile
| `-- config.yaml
`-- services
|-- address
| |-- Dockerfile
| `-- main.go
|-- bio
| |-- Dockerfile
| `-- main.go
`-- hello
|-- Dockerfile
|-- main.go
`-- service
`-- endpoint.go