Struct ProxyRouteFailureCache
pub struct ProxyRouteFailureCache { /* private fields */ }net only.Expand description
Shared negative cache for temporarily failing proxy routes.
The cache is bounded and safe to clone across connector services. Healthy routes create only transient state while an attempt is in flight; a success or non-cacheable failure removes it, so retained entries represent negative backoff state. State transitions for one route key use atomics and do not contend with unrelated proxy routes or destinations. After a backoff expires, at most one caller receives a half-open probe permit for that key.
Keys contain the proxy protocol and address, an optional Basic routing username, and optionally the final destination protocol and address. Basic passwords and bearer tokens are never retained in a key.
Implementations§
§impl ProxyRouteFailureCache
impl ProxyRouteFailureCache
pub fn try_new(
config: ProxyRouteFailureCacheConfig,
) -> Result<ProxyRouteFailureCache, Box<dyn Error + Send + Sync>>
pub fn try_new( config: ProxyRouteFailureCacheConfig, ) -> Result<ProxyRouteFailureCache, Box<dyn Error + Send + Sync>>
Create a failure cache using the given validated configuration.
pub fn config(&self) -> &ProxyRouteFailureCacheConfig
pub fn config(&self) -> &ProxyRouteFailureCacheConfig
Return the configured cache policy.
pub fn entry_count(&self) -> u64
pub fn entry_count(&self) -> u64
Return an approximate number of retained cache entries.
pub fn invalidate_all(&self)
pub fn invalidate_all(&self)
Clear every retained proxy failure and backoff state.
Trait Implementations§
§impl Clone for ProxyRouteFailureCache
impl Clone for ProxyRouteFailureCache
§fn clone(&self) -> ProxyRouteFailureCache
fn clone(&self) -> ProxyRouteFailureCache
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ProxyRouteFailureCache
impl Debug for ProxyRouteFailureCache
§impl Default for ProxyRouteFailureCache
impl Default for ProxyRouteFailureCache
§fn default() -> ProxyRouteFailureCache
fn default() -> ProxyRouteFailureCache
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyRouteFailureCache
impl !UnwindSafe for ProxyRouteFailureCache
impl Freeze for ProxyRouteFailureCache
impl Send for ProxyRouteFailureCache
impl Sync for ProxyRouteFailureCache
impl Unpin for ProxyRouteFailureCache
impl UnsafeUnpin for ProxyRouteFailureCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
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> ⓘ
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more