#[non_exhaustive]pub enum DaemonControl {
Shutdown {
grace_period_ms: u64,
},
DrainStart {
grace_period_ms: u64,
},
DrainFinish,
BackpressureOn {
level: f32,
},
BackpressureOff,
}Expand description
Supervisor → daemon control event. Delivered via
MeshDaemon::on_control. Carries relative-duration
deadlines (no Instant) so a daemon running under any
clock source can react.
The MeshOS-side richer form MeshOsControl carries
Instant deadlines for SDK scheduling; the supervisor
integration layer converts via MeshOsControl::to_daemon_control(now).
#[non_exhaustive] so later phases add control variants
without breaking daemon implementations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Shutdown
Graceful shutdown. The daemon should finish in-flight
work and exit before grace_period_ms elapses. Past the
deadline the supervisor force-terminates.
DrainStart
Drain start. Stop accepting new work; in-flight work
continues until grace_period_ms elapses or DrainFinish
arrives.
DrainFinish
Drain done. The daemon should exit immediately; in-flight work may be abandoned.
BackpressureOn
Cluster-wide backpressure is asserted. The daemon should
reduce optional work (cache warmup, background indexing,
etc.) proportional to level ∈ [0.0, 1.0]. 1.0 means
“pause optional work entirely”.
Fields
BackpressureOff
Cluster-wide backpressure cleared. Resume normal work.
Trait Implementations§
Source§impl Clone for DaemonControl
impl Clone for DaemonControl
Source§fn clone(&self) -> DaemonControl
fn clone(&self) -> DaemonControl
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 DaemonControl
impl Debug for DaemonControl
Source§impl PartialEq for DaemonControl
impl PartialEq for DaemonControl
Source§fn eq(&self, other: &DaemonControl) -> bool
fn eq(&self, other: &DaemonControl) -> bool
self and other values to be equal, and is used by ==.