#[non_exhaustive]pub struct ConcurrencyConfig {
pub max_in_flight: usize,
pub scope: Option<ScopeConfig>,
}Expand description
Request concurrency limit: requests past max_in_flight are answered
UNAVAILABLE (503) at once instead of queueing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_in_flight: usizeMost requests in flight at once, counted until each response body ends, so a stream holds its slot for its whole life. At least 1.
scope: Option<ScopeConfig>The traffic the limit covers, one budget shared by all of it.
Default: transcoded and grpc; the proxy’s own endpoints stay out,
so health probes answer while the proxy is saturated.
Implementations§
Source§impl ConcurrencyConfig
impl ConcurrencyConfig
Sourcepub fn new(max_in_flight: usize) -> Self
pub fn new(max_in_flight: usize) -> Self
At most max_in_flight requests at once, over the default traffic.
Sourcepub fn with_scope(self, scope: ScopeConfig) -> Self
pub fn with_scope(self, scope: ScopeConfig) -> Self
The same limit over the traffic scope names.
Trait Implementations§
Source§impl Clone for ConcurrencyConfig
impl Clone for ConcurrencyConfig
Source§impl Debug for ConcurrencyConfig
impl Debug for ConcurrencyConfig
Source§impl<'de> Deserialize<'de> for ConcurrencyConfig
impl<'de> Deserialize<'de> for ConcurrencyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConcurrencyConfig
impl RefUnwindSafe for ConcurrencyConfig
impl Send for ConcurrencyConfig
impl Sync for ConcurrencyConfig
impl Unpin for ConcurrencyConfig
impl UnsafeUnpin for ConcurrencyConfig
impl UnwindSafe for ConcurrencyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request