pub struct SkillsBackoff { /* private fields */ }Expand description
Per-domain exponential backoff state for the cadence Skills arm.
Implementations§
Source§impl SkillsBackoff
impl SkillsBackoff
Sourcepub fn due(&self, flagged: &[String], tick: u64) -> Vec<String>
pub fn due(&self, flagged: &[String], tick: u64) -> Vec<String>
The flagged domains that are due an attempt at tick (never attempted,
or past their backoff window).
Sourcepub fn note_attempt(&mut self, domain: &str, tick: u64)
pub fn note_attempt(&mut self, domain: &str, tick: u64)
Record that domain was attempted at tick: the next attempt is
allowed 2^attempts ticks later (exponent capped at
[BACKOFF_MAX_EXPONENT]). Every attempt widens the window — a domain
only stops backing off by recovering (see
Self::reset_recovered), so unattended inference spend on a domain
that stays broken decays geometrically instead of repeating each tick.
Sourcepub fn reset_recovered(&mut self, flagged: &[String])
pub fn reset_recovered(&mut self, flagged: &[String])
Drop backoff state for domains no longer flagged — an observed recovery resets the counter, so a relapse starts fresh.
Trait Implementations§
Source§impl Debug for SkillsBackoff
impl Debug for SkillsBackoff
Auto Trait Implementations§
impl Freeze for SkillsBackoff
impl RefUnwindSafe for SkillsBackoff
impl Send for SkillsBackoff
impl Sync for SkillsBackoff
impl Unpin for SkillsBackoff
impl UnsafeUnpin for SkillsBackoff
impl UnwindSafe for SkillsBackoff
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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 more