pub struct SupervisorConfig {
pub name: &'static str,
pub tcb_critical: bool,
pub trip_after: u32,
pub max_restarts: u32,
pub base_backoff: Duration,
pub max_backoff: Duration,
}Expand description
Restart and trip policy for one supervised worker.
Fields§
§name: &'static strStable identifier used in log lines, thread names, and health reasons.
tcb_critical: boolA tripped flag on a TCB-critical surface fails evaluations closed.
trip_after: u32Consecutive restarts before the flag trips to Degraded.
max_restarts: u32Consecutive restarts before terminal Failed, after which the supervisor
stops respawning and leaves the flag set for surfaces to read.
base_backoff: DurationFirst backoff delay; subsequent delays double up to max_backoff.
max_backoff: DurationCeiling on the exponential backoff delay.
Implementations§
Trait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Source§fn clone(&self) -> SupervisorConfig
fn clone(&self) -> SupervisorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SupervisorConfig
impl RefUnwindSafe for SupervisorConfig
impl Send for SupervisorConfig
impl Sync for SupervisorConfig
impl Unpin for SupervisorConfig
impl UnsafeUnpin for SupervisorConfig
impl UnwindSafe for SupervisorConfig
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