pub enum InjectedFault {
WorkerCrash,
CalleeTimeout,
RateLimited {
retry_after_ms: u64,
},
ResourceExhausted,
}Expand description
One injectable fault. The taxonomy mirrors the world’s failure modes the
scheduler already classifies: each variant names the ErrorClass the
injected failure is observed with.
Variants§
WorkerCrash
The worker dies mid-attempt. The attempt is lost and surfaces at the
lease boundary (MAX_RETRY_DELAY_MS) classified
ErrorClass::Unknown — the lease-expiry path, the dead-letter
queue’s primary input.
CalleeTimeout
The attempt never completes on its own. With no timeout bound in
force it surfaces at the lease boundary; with a bound, at the bound,
classified ErrorClass::Timeout either way.
RateLimited
The callee asks to be slowed down: ErrorClass::RateLimited with
a Retry-After floor any policy’s delay must respect.
ResourceExhausted
The worker or callee is out of capacity:
ErrorClass::ResourceExhausted. Retryable — ideally on a
different worker, which is what makes this the placement family’s
fault.
Implementations§
Source§impl InjectedFault
impl InjectedFault
Sourcepub fn error_class(&self) -> ErrorClass
pub fn error_class(&self) -> ErrorClass
The class the scheduler observes for this fault.