#[non_exhaustive]pub enum MeshOsControl {
Shutdown {
deadline: Instant,
},
DrainStart {
deadline: Instant,
},
DrainFinish,
BackpressureOn {
level: f32,
},
BackpressureOff,
}Expand description
Supervisor → daemon control event. Delivered via the
per-daemon control channel (separate from the process()
event stream). The daemon implements on_control(&mut self, event: MeshOsControl) (default impl ignores everything).
#[non_exhaustive] so later phases add control variants
without breaking implementors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Shutdown
Graceful shutdown. The daemon should finish in-flight
work and exit before deadline. Past the deadline the
supervisor force-terminates.
Fields
DrainStart
Drain start. Stop accepting new work; in-flight work
continues until MeshOsControl::DrainFinish arrives or
the deadline elapses.
DrainFinish
Drain done. All in-flight work that’s still running may be abandoned; the daemon should exit.
BackpressureOn
Cluster-wide backpressure is active. The daemon should
reduce optional work (cache warmup, background indexing,
etc.) by roughly level ∈ [0.0, 1.0] — 1.0 means
“pause optional work entirely”.
Fields
BackpressureOff
Cluster-wide backpressure cleared. Resume normal work.
Implementations§
Source§impl MeshOsControl
impl MeshOsControl
Sourcepub fn to_daemon_control(&self, now: Instant) -> DaemonControl
pub fn to_daemon_control(&self, now: Instant) -> DaemonControl
Convert this SDK-internal event to the WASM-friendly
DaemonControl form the daemon’s on_control method
receives. now anchors the relative-ms conversion of
the Instant deadlines; deadlines in the past clamp to
0.
Trait Implementations§
Source§impl Clone for MeshOsControl
impl Clone for MeshOsControl
Source§fn clone(&self) -> MeshOsControl
fn clone(&self) -> MeshOsControl
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 MeshOsControl
impl Debug for MeshOsControl
Source§impl PartialEq for MeshOsControl
impl PartialEq for MeshOsControl
Source§fn eq(&self, other: &MeshOsControl) -> bool
fn eq(&self, other: &MeshOsControl) -> bool
self and other values to be equal, and is used by ==.