pub struct EdgeManager { /* private fields */ }Expand description
Edge Computing Manager
Implementations§
Source§impl EdgeManager
impl EdgeManager
pub fn new(node_id: impl Into<String>, region: impl Into<String>) -> Self
Sourcepub fn register_node(&self, node: EdgeNode)
pub fn register_node(&self, node: EdgeNode)
Register a remote edge node
Sourcepub fn unregister_node(&self, node_id: &str)
pub fn unregister_node(&self, node_id: &str)
Unregister an edge node
Sourcepub fn update_node_health(&self, node_id: &str, is_healthy: bool)
pub fn update_node_health(&self, node_id: &str, is_healthy: bool)
Update node health status
Sourcepub fn update_node_load(&self, node_id: &str, load: f64)
pub fn update_node_load(&self, node_id: &str, load: f64)
Update node load
Sourcepub fn healthy_nodes(&self) -> Vec<EdgeNode>
pub fn healthy_nodes(&self) -> Vec<EdgeNode>
Get all healthy nodes
Sourcepub fn find_best_node(&self, strategy: DistributionStrategy) -> Option<String>
pub fn find_best_node(&self, strategy: DistributionStrategy) -> Option<String>
Find best node for task execution
Sourcepub fn distribute_tasks(
&self,
task_count: usize,
strategy: DistributionStrategy,
) -> TaskDistribution
pub fn distribute_tasks( &self, task_count: usize, strategy: DistributionStrategy, ) -> TaskDistribution
Distribute tasks across nodes
Sourcepub fn node_stats(&self, node_id: &str) -> Option<EdgeNode>
pub fn node_stats(&self, node_id: &str) -> Option<EdgeNode>
Get node statistics
Trait Implementations§
Source§impl Clone for EdgeManager
impl Clone for EdgeManager
Source§fn clone(&self) -> EdgeManager
fn clone(&self) -> EdgeManager
Returns a duplicate of the value. Read more
1.0.0§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 EdgeManager
impl RefUnwindSafe for EdgeManager
impl Send for EdgeManager
impl Sync for EdgeManager
impl Unpin for EdgeManager
impl UnwindSafe for EdgeManager
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)