pub struct EdgeNodeManager { /* private fields */ }Expand description
Edge Node Manager
Implementations§
Source§impl EdgeNodeManager
impl EdgeNodeManager
Sourcepub async fn register_node(
&self,
name: String,
location: String,
endpoint: String,
capacity: NodeCapacity,
) -> Uuid
pub async fn register_node( &self, name: String, location: String, endpoint: String, capacity: NodeCapacity, ) -> Uuid
Register a new edge node
Sourcepub async fn update_heartbeat(
&self,
node_id: Uuid,
) -> Result<(), EdgeComputingError>
pub async fn update_heartbeat( &self, node_id: Uuid, ) -> Result<(), EdgeComputingError>
Update node heartbeat
Sourcepub async fn get_online_nodes(&self) -> Vec<EdgeNode>
pub async fn get_online_nodes(&self) -> Vec<EdgeNode>
Get all online nodes
Sourcepub async fn update_node_status(
&self,
node_id: Uuid,
status: NodeStatus,
) -> Result<(), EdgeComputingError>
pub async fn update_node_status( &self, node_id: Uuid, status: NodeStatus, ) -> Result<(), EdgeComputingError>
Update node status
Sourcepub async fn update_node_capacity(
&self,
node_id: Uuid,
capacity: NodeCapacity,
) -> Result<(), EdgeComputingError>
pub async fn update_node_capacity( &self, node_id: Uuid, capacity: NodeCapacity, ) -> Result<(), EdgeComputingError>
Update node capacity
Sourcepub async fn remove_node(&self, node_id: Uuid) -> Result<(), EdgeComputingError>
pub async fn remove_node(&self, node_id: Uuid) -> Result<(), EdgeComputingError>
Remove a node
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EdgeNodeManager
impl !UnwindSafe for EdgeNodeManager
impl Freeze for EdgeNodeManager
impl Send for EdgeNodeManager
impl Sync for EdgeNodeManager
impl Unpin for EdgeNodeManager
impl UnsafeUnpin for EdgeNodeManager
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