pub struct DrainConfig {
pub min_upload_interval: Duration,
pub initial_backoff: Duration,
pub max_backoff: Duration,
pub held_recheck_interval: Duration,
pub park_check_interval: Duration,
pub max_retriable_attempts: u32,
}Expand description
Tuning for one drain loop. Production uses DrainConfig::default; tests
construct short intervals (a code-level parameter, not a knob — there is
no env var and the default is always right, per house rule #1a).
Fields§
§min_upload_interval: DurationSPOOL-7: minimum gap between uploads (shared org rate-limit budget).
initial_backoff: DurationFirst retry delay for a retriable failure; doubles per failed round.
max_backoff: DurationCeiling for the exponential schedule.
held_recheck_interval: DurationHow often held entries (capability not advertised / no session / anonymous) re-check — only while the outbox is non-empty (DEG-3 without violating PRIV-1).
park_check_interval: DurationWhile PARKED (no pending entries), how often the loop does the
LOCAL-ONLY disk check for pending entries that arrived without a
Notify — a CLI’s direct spool enqueue (finding #11). The check reads
the outbox (the directory listing, then the spool’s own list when
entries exist) and nothing else: no transport call is ever made from
the park tick itself.
max_retriable_attempts: u32Finding F13: consecutive retriable failures (5xx/408/3xx/network) an
entry may accumulate in THIS process before the drain stops re-posting
it — the entry stays Queued on disk and gets a fresh budget on the
next daemon start (see the module docs). At the default schedule the
default of 24 is roughly five hours of retrying (30s doubling to the
15-minute ceiling, then 18 more 15-minute rounds).
Trait Implementations§
Source§impl Clone for DrainConfig
impl Clone for DrainConfig
Source§impl Debug for DrainConfig
impl Debug for DrainConfig
Auto Trait Implementations§
impl Freeze for DrainConfig
impl RefUnwindSafe for DrainConfig
impl Send for DrainConfig
impl Sync for DrainConfig
impl Unpin for DrainConfig
impl UnsafeUnpin for DrainConfig
impl UnwindSafe for DrainConfig
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
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<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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