pub struct ResourcePressure { /* private fields */ }Expand description
Sheds the miss tier under concurrency pressure and any class under egress saturation, while capping a single client’s share only during real contention. Holds one bit of hysteresis state.
Implementations§
Trait Implementations§
Source§impl Debug for ResourcePressure
impl Debug for ResourcePressure
Source§impl LoadShedPolicy for ResourcePressure
impl LoadShedPolicy for ResourcePressure
Source§fn decide(&self, class: RequestClass, snap: &PressureSnapshot) -> ShedDecision
fn decide(&self, class: RequestClass, snap: &PressureSnapshot) -> ShedDecision
Judge one request against a single pressure sample.
Source§fn pressure_active(&self) -> bool
fn pressure_active(&self) -> bool
Whether the policy currently considers the node pressured. Drives the
load_shed_pressure_active gauge; defaults to false for policies with
no pressure notion (e.g. AlwaysAdmit).Auto Trait Implementations§
impl !Freeze for ResourcePressure
impl RefUnwindSafe for ResourcePressure
impl Send for ResourcePressure
impl Sync for ResourcePressure
impl Unpin for ResourcePressure
impl UnsafeUnpin for ResourcePressure
impl UnwindSafe for ResourcePressure
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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::RequestCreates a shared type from an unshared type.