Comments (7)
I think this would be pretty interesting to build, if no one else is already working on it, I can try to put up a PR in a bit?
Aside from timeouts, there's also cancelation. Is there a story around this yet in tonic?
from tonic.
Huge +1 here. In particular I need support for setting them on the client. Adding them manually appears to not work, since it looks like all the GRPC_RESERVED_HEADERS
are silently stripped (which isn't so fun) as mentioned in #516. If there's anything I can do to help @LucioFranco I am happy to do so.
from tonic.
Hi Yes, this should be possible by implementing a custom service layer that reads the initial headers and wraps its inner future with a timeout.
from tonic.
I think the right method would be to create a version of https://github.com/tower-rs/tower/tree/master/tower/src/timeout that gets the timeout from a header rather than a static value.
from tonic.
@LucioFranco Hi, is there an update regarding cancellation support in tonic
?
from tonic.
No updates from my end yet, its easy to support cancellation by dropping the task but we currently do not parse the headers for a timeout automatically.
from tonic.
I feel I need to set deadline or timeout on client as well, otherwise my Rust client cannot talk to our Java gRPC servers as they are build to require having deadline specified.
from tonic.
Related Issues (20)
- nit: inconsistent use of crate::Error vs Error in single transport src file
- calling grpc server hosted on cloud run with https fails with transport error HOT 2
- version 0.12.1 causes ClientTlsConfig to explode with invalid CryptoProvider HOT 2
- Configuring Timeout for Graceful Shutdown HOT 1
- How to get grpc-status in Layer? HOT 1
- Make the TimeoutExpired a public tonic type rather than a transport type
- tonic_build clone server
- long headers from the server hang tonic HOT 5
- Non-Anonymous Authentication
- The trait `Message` is not implemented HOT 1
- Remove trait bound on generated server struct
- NamedService makes it impossible to wrap individual services with non-intercept layers HOT 2
- After tonic is updated from 0.8.3 to 0.11.0 in the csi driver, an error message "PROTOCOL_ERROR" is displayed when kubelet calls the get_info interface.
- Share tonic server port with other http routes HOT 3
- Protobuf bytes field incorrectly parsed as String when generating gRPC code with tonic_build HOT 1
- tonic-build can no longer build code with rust < 1.77.0, due to newer build-script syntax HOT 1
- Tonic v0.13 fails to build what worked on v0.12 HOT 1
- The tonic server process exit unexpected when the client get a wrong tls config HOT 3
- Implement prost::Name for message types
- 0.12 reports invalid cert where 0.11 succeeded HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tonic.