Bumps routeguide tutorial dependency to tokio 1.0 for compatability with
tonic 0.4. Also adds required rt-multi-thread feature and drops unused
and now unsupported stream feature.
Signed-off-by: hasheddan <[email protected]>
* Upgrade Tonic to Tokio 1.0
Work in progress for updating Tonic to Tokio 1.0. Since tower has not
been released to crates.io, a git dependency is taken instead.
* Upgrade Tonic to Tokio 1.0 phase 2
* tonic: remove tower-* deps
* Apply suggestions from code review
Co-authored-by: Ed Marshall <[email protected]>
Co-authored-by: Lucio Franco <[email protected]>
* transport: impl Service for Channel instead of GrpcService
This adds tower::Service impl for tonic::transport::Channel
and removes GrpcService impl declaration.
Channel still implements GrpcService, thanks to the general
impl declaration of GrpcService for types who implement Service.
Fixes#481.
* examples: stop using GrpcService to avoid ambiguity
* examples: add timeout example
* examples: update to `tracing` 0.1.14, use `#[instrument]`
Now that `tracing-attributes`'s `#[instrument]` macro plays nicely with
`async-trait`, we can update the tracing example to use `instrument`.
This lets us simplify the events emitted in the example.
Signed-off-by: Eliza Weisman <[email protected]>
* feat(transport): Dynamic load balancing (#341)
* Fix typo (#356)
Co-authored-by: Dawid Nowak <[email protected]>
Co-authored-by: Paulo Duarte <[email protected]>
* Propagate errors in tls_config instead of unwrap
Ran into `tls_connector` failing and causing our app to panic and shutdown as it seems there wasn't any way to avoid panicking in `tls_config`.
So after talking to @LucioFranco briefly `tls_config` now returns a `Result` instead and propagates errors to the caller, where they can be handled.
* Fix compile warning when tls feature is disabled
This change reverts #366. The `proto/` directory, as described in the guide,
is created under the root of the crate. Not under `src/`.
I've also included a fix to the `grpcurl` endpoint.
Fixed wrong path "proto/helloworld.proto" for `compile_protos` first argument. `build.rs` being in the project root, means the correct path should be "src/proto/helloworld.proto".
* Create an example of an autoreloading server
* Document the autoreloading server example
* Format autoreloading server example
* Add note about cargo-watch in the examples readme
This commit adds a new crate `tonic-health` which implements the
[standard GRPC Health Checking][checking] protocol.
Currently there is only a server implementation, though others have
alluded in the discussion in #135 that client implementations exist
which could also be imported as necessary.
A example server has also been added - once the client work is done a
client for this should be added also.
[checking]: https://github.com/grpc/grpc/blob/master/doc/health-checking.mdFixes#135.
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`.