pub struct EdgeOrchestrator { /* private fields */ }Expand description
Edge Task Orchestrator
Implementations§
Source§impl EdgeOrchestrator
impl EdgeOrchestrator
Sourcepub fn new(node_manager: Arc<EdgeNodeManager>) -> Self
pub fn new(node_manager: Arc<EdgeNodeManager>) -> Self
Create a new edge orchestrator
Sourcepub async fn submit_task(
&self,
task_type: TaskType,
payload: Value,
priority: TaskPriority,
) -> Uuid
pub async fn submit_task( &self, task_type: TaskType, payload: Value, priority: TaskPriority, ) -> Uuid
Submit a task for execution
Sourcepub async fn assign_task(
&self,
task_id: Uuid,
) -> Result<Uuid, EdgeComputingError>
pub async fn assign_task( &self, task_id: Uuid, ) -> Result<Uuid, EdgeComputingError>
Assign task to best available node
Sourcepub async fn get_task_status(&self, task_id: Uuid) -> Option<TaskStatus>
pub async fn get_task_status(&self, task_id: Uuid) -> Option<TaskStatus>
Get task status
Sourcepub async fn get_task_result(&self, task_id: Uuid) -> Option<Value>
pub async fn get_task_result(&self, task_id: Uuid) -> Option<Value>
Get task result
Sourcepub async fn complete_task(
&self,
task_id: Uuid,
result: Value,
) -> Result<(), EdgeComputingError>
pub async fn complete_task( &self, task_id: Uuid, result: Value, ) -> Result<(), EdgeComputingError>
Complete a task
Sourcepub async fn fail_task(
&self,
task_id: Uuid,
error: String,
) -> Result<(), EdgeComputingError>
pub async fn fail_task( &self, task_id: Uuid, error: String, ) -> Result<(), EdgeComputingError>
Fail a task
Sourcepub async fn get_pending_tasks(&self) -> Vec<EdgeTask>
pub async fn get_pending_tasks(&self) -> Vec<EdgeTask>
Get pending tasks
Auto Trait Implementations§
impl !RefUnwindSafe for EdgeOrchestrator
impl !UnwindSafe for EdgeOrchestrator
impl Freeze for EdgeOrchestrator
impl Send for EdgeOrchestrator
impl Sync for EdgeOrchestrator
impl Unpin for EdgeOrchestrator
impl UnsafeUnpin for EdgeOrchestrator
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