pub struct CacheClientConfig {
pub connect_timeout: Duration,
pub abandon_timeout: Duration,
pub stall_timeout: Duration,
pub total_timeout: Duration,
pub breaker: CircuitBreakerConfig,
}Expand description
Tunables for CacheClientStore. Default carries the production values,
from_env applies operator overrides, and tests construct one directly
(short timeouts, near-zero or very long cooldown) instead of sleeping.
Fields§
§connect_timeout: Duration§abandon_timeout: DurationThe direct-path race budget: every phase where the cache can lose,
which after Phase 0 is all of them. Applied at the header (time-to-
headers) phase of the five send() sites.
stall_timeout: DurationPer-chunk bound on get_ranges’ pull_exact read. Looser than
abandon_timeout because a mid-stream abandon re-reads the ranges
not yet delivered – a cost knob, not a correctness bound. Also backs
the GET /obj response body’s per-frame bound, but not directly:
the client’s ClientBuilder::read_timeout is set to stall_timeout + abandon_timeout (looser by a margin), so /ranges’ own explicit
pull_exact wrap – set to stall_timeout exactly – is always the
one that fires first on a real stall, never read_timeout. Reused as
the breaker’s cooldown.
total_timeout: Duration§breaker: CircuitBreakerConfigImplementations§
Source§impl CacheClientConfig
impl CacheClientConfig
Sourcepub fn from_env() -> CacheClientConfig
pub fn from_env() -> CacheClientConfig
Apply MICROMEGAS_OBJECT_CACHE_CLIENT_* operator overrides on top of
Default. stall_timeout/total_timeout stay fixed named constants
(see “The constants that are not env vars”); only the connect budget,
abandon budget, and breaker threshold are env-overridable.
Trait Implementations§
Source§impl Clone for CacheClientConfig
impl Clone for CacheClientConfig
Source§fn clone(&self) -> CacheClientConfig
fn clone(&self) -> CacheClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheClientConfig
impl Debug for CacheClientConfig
Source§impl Default for CacheClientConfig
impl Default for CacheClientConfig
Source§fn default() -> CacheClientConfig
fn default() -> CacheClientConfig
Auto Trait Implementations§
impl Freeze for CacheClientConfig
impl RefUnwindSafe for CacheClientConfig
impl Send for CacheClientConfig
impl Sync for CacheClientConfig
impl Unpin for CacheClientConfig
impl UnsafeUnpin for CacheClientConfig
impl UnwindSafe for CacheClientConfig
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
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 tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].