pub struct Node { /* private fields */ }Expand description
A node in the cluster
Implementations§
Source§impl Node
 
impl Node
Sourcepub fn status(&self) -> NodeStatus
 
pub fn status(&self) -> NodeStatus
Get node status
Sourcepub fn set_status(&self, status: NodeStatus)
 
pub fn set_status(&self, status: NodeStatus)
Update node status
Sourcepub fn is_available(&self) -> bool
 
pub fn is_available(&self) -> bool
Check if node is available
Sourcepub fn load_factor(&self) -> f64
 
pub fn load_factor(&self) -> f64
Get load factor
Sourcepub fn update_usage(&self, usage: ResourceUsage)
 
pub fn update_usage(&self, usage: ResourceUsage)
Update resource usage
Sourcepub fn record_heartbeat(&self)
 
pub fn record_heartbeat(&self)
Record heartbeat
Sourcepub fn increment_active_tasks(&self)
 
pub fn increment_active_tasks(&self)
Increment active task count
Sourcepub fn decrement_active_tasks(&self)
 
pub fn decrement_active_tasks(&self)
Decrement active task count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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