transport: impl Service for Channel instead of GrpcService (#482)

* 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
This commit is contained in:
Koki Kato
2021-01-05 13:36:18 -05:00
committed by GitHub
parent 2b9cdb9779
commit e7be352132
5 changed files with 88 additions and 7 deletions
+8
View File
@@ -74,6 +74,14 @@ path = "src/tower/server.rs"
name = "tower-client"
path = "src/tower/client.rs"
[[bin]]
name = "timeout-server"
path = "src/timeout/server.rs"
[[bin]]
name = "timeout-client"
path = "src/timeout/client.rs"
[[bin]]
name = "multiplex-server"
path = "src/multiplex/server.rs"