pub enum SystemSignal {
NodeOverloaded {
node_id: NodeId,
queue_id: Option<QueueId>,
},
NodeIdle {
node_id: NodeId,
queue_id: Option<QueueId>,
},
TaskDequeuedByWorker {
node_id: NodeId,
task_id: TaskId,
},
TaskProcessed {
node_id: NodeId,
task_id: TaskId,
duration_micros: u64,
},
}Expand description
Represents operational events that are passed within the system.
These signals provide real-time feedback from nodes to the central system, allowing it to monitor health and make load-balancing decisions.
Variants§
NodeOverloaded
Sent when a node’s task queue is nearing its capacity.
NodeIdle
Sent when a previously overloaded node has cleared enough space in its queue.
TaskDequeuedByWorker
Sent by a worker just before it begins executing a task.
TaskProcessed
Sent by a worker after it has finished executing a task.
Implementations§
Source§impl SystemSignal
impl SystemSignal
Sourcepub fn get_node_id(&self) -> NodeId
pub fn get_node_id(&self) -> NodeId
A convenience method to get the NodeId from any signal type.
Trait Implementations§
Source§impl Clone for SystemSignal
impl Clone for SystemSignal
Source§fn clone(&self) -> SystemSignal
fn clone(&self) -> SystemSignal
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 SystemSignal
impl RefUnwindSafe for SystemSignal
impl Send for SystemSignal
impl Sync for SystemSignal
impl Unpin for SystemSignal
impl UnsafeUnpin for SystemSignal
impl UnwindSafe for SystemSignal
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