Files
tonic/examples
Lucio FrancoandGitHub eba7ec7b32 feat: Add gRPC interceptors (#232)
This change introduces proper gRPC interceptors that are avilable
regardless of the transport used. Each codegen service now produces an
additional method called `with_interceptor` that accepts a
`Interceptor`.

All examples have been updated to use this new style and interop has a
custom `tower::Service` middleware to echo the headers. There is also a
new `interceptor` example that shows basic usage.

BREAKING CHANGE: removed `interceptor_fn` and `intercep_headers_fn` from `transport` in favor of using `tonic::Interceptor`.
2020-01-13 21:26:08 -05:00
..
2020-01-13 21:26:08 -05:00
2020-01-13 21:26:08 -05:00

Examples

Set of examples that show off the features provided by tonic.

Helloworld

Client

$ cargo run --bin helloworld-client

Server

$ cargo run --bin helloworld-server

RouteGuide

Client

$ cargo run --bin routeguide-client

Server

$ cargo run --bin routeguide-server

Authentication

Client

$ cargo run --bin authentication-client

Server

$ cargo run --bin authentication-server

Load balance

Client

$ cargo run --bin load-balance-client

Server

$ cargo run --bin load-balance-server

TLS (rustls)

Client

$ cargo run --bin tls-client

Server

$ cargo run --bin tls-server

Notes:

If you are using the codegen feature, then the following dependencies are required: