Home
last modified time | relevance | path

Searched refs:timeout (Results 1 – 14 of 14) sorted by relevance

/tonic/examples/src/cancellation/
H A Dclient.rs4 use tokio::time::{timeout, Duration};
19 let response = match timeout(Duration::from_secs(1), client.say_hello(request)).await { in main()
/tonic/tonic/src/
H A Drequest.rs467 let timeout = Duration::from_millis(500); in duration_to_grpc_timeout_less_than_second() localVariable
468 let value = duration_to_grpc_timeout(timeout); in duration_to_grpc_timeout_less_than_second()
469 assert_eq!(value, format!("{}u", timeout.as_micros())); in duration_to_grpc_timeout_less_than_second()
474 let timeout = Duration::from_secs(30); in duration_to_grpc_timeout_more_than_second() localVariable
475 let value = duration_to_grpc_timeout(timeout); in duration_to_grpc_timeout_more_than_second()
476 assert_eq!(value, format!("{}u", timeout.as_micros())); in duration_to_grpc_timeout_more_than_second()
H A Dstatus.rs611 if let Some(timeout) = err.downcast_ref::<TimeoutExpired>() { in find_status_in_source_chain()
612 return Some(Status::cancelled(timeout.to_string())); in find_status_in_source_chain()
/tonic/tonic/src/transport/server/
H A Dmod.rs92 timeout: Option<Duration>, field
116 timeout: None, in default()
196 pub fn timeout(self, timeout: Duration) -> Self { in timeout() method
198 timeout: Some(timeout), in timeout()
519 timeout: self.timeout, in layer()
651 let timeout = self.timeout; in serve_internal() localVariable
674 timeout, in serve_internal()
1059 timeout: Option<Duration>, field
1087 let timeout = self.timeout; in call() localVariable
1093 .layer_fn(|s| GrpcTimeout::new(s, timeout)) in call()
/tonic/examples/src/dynamic_load_balance/
H A Dclient.rs13 use tokio::time::timeout;
70 if let Ok(resp) = timeout(tokio::time::Duration::from_secs(10), rx).await { in main()
/tonic/tonic/src/transport/channel/
H A Dendpoint.rs23 pub(crate) timeout: Option<Duration>, field
146 pub fn timeout(self, dur: Duration) -> Self { in timeout() method
148 timeout: Some(dur), in timeout()
452 timeout: None, in from()
/tonic/tonic/src/service/
H A Dlayered.rs85 use tower::{limit::ConcurrencyLimitLayer, timeout::TimeoutLayer}; in named_service_is_propagated_to_layered()
/tonic/tonic/
H A DCargo.toml52 "dep:hyper-timeout",
99 hyper-timeout = {version = "0.5", optional = true}
/tonic/tests/integration_tests/tests/
H A Dtimeout.rs84 .timeout(server_timeout) in run_service_in_background()
/tonic/interop/src/bin/
H A Dclient.rs36 .timeout(Duration::from_secs(5)) in main()
/tonic/tonic/src/transport/channel/service/
H A Dconnection.rs65 .layer_fn(|s| GrpcTimeout::new(s, endpoint.timeout)) in new()
/tonic/
H A DCONTRIBUTING.md156 /// // import the `timeout` function, usually this is done
176 /// process.timeout(Duration::from_millis(10))
183 `FutureExt::timeout`, this is how the documentation test is structured.
H A DCHANGELOG.md95 - Added connection timeout for `connecto_with_connector_lazy`.
398 * **transport:** add connect timeout to `Endpoint` ([#662](https://github.com/hyperium/tonic/issues…
409 * **transport:** Support timeouts with "grpc-timeout" header ([#606](https://github.com/hyperium/to…
431 * Revert "Remove grpc-timeout header from reserved headers (#603)" ([7aaa2f8](https://github.com/hy…
475 * **transport:** expose HTTP2 server keepalive interval and timeout ([#486](https://github.com/hype…
/tonic/examples/proto/googleapis/google/pubsub/v1/
H A Dpubsub.proto672 // For push delivery, this value is also used to set the request timeout for