feat(transport): Support timeouts with "grpc-timeout" header (#606)

* transport: Support timeouts with "grpc-timeout" header

* Apply suggestions from code review

Co-authored-by: Lucio Franco <[email protected]>

* Timeout -> GrpcTimeout and export TimeoutExpired

* Clean up imports

* Give header name a more proper home

* Add fuzz tests for parsing header value into `grpc-timeout`

* Map `TimeoutExpired` to `cancelled` status

* Recover from timeout errors in the service

* Refactor tests

* Fix CI

* Fix CI, again

Co-authored-by: Lucio Franco <[email protected]>
This commit is contained in:
David Pedersen
2021-04-29 10:28:16 +02:00
committed by GitHub
co-authored by Lucio Franco
parent 4926c60df4
commit 9ff4f7b8e4
13 changed files with 494 additions and 14 deletions
+1
View File
@@ -16,6 +16,7 @@ bytes = "1.0"
[dev-dependencies]
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "net"] }
tokio-stream = { version = "0.1.5", features = ["net"] }
[build-dependencies]
tonic-build = { path = "../../tonic-build" }