pub struct ClusterManager { /* private fields */ }Expand description
Distributed cluster manager
Implementations§
Source§impl ClusterManager
impl ClusterManager
Sourcepub fn new(config: ClusterConfig) -> Self
pub fn new(config: ClusterConfig) -> Self
Create a new cluster manager
Sourcepub fn add_node(&self, node: ClusterNode) -> SklResult<()>
pub fn add_node(&self, node: ClusterNode) -> SklResult<()>
Add a node to the cluster
Sourcepub fn remove_node(&self, node_id: &NodeId) -> SklResult<()>
pub fn remove_node(&self, node_id: &NodeId) -> SklResult<()>
Remove a node from the cluster
Sourcepub fn submit_task(&self, task: DistributedTask) -> SklResult<TaskId>
pub fn submit_task(&self, task: DistributedTask) -> SklResult<TaskId>
Submit a distributed task
Sourcepub fn get_task_result(&self, task_id: &TaskId) -> Option<TaskResult>
pub fn get_task_result(&self, task_id: &TaskId) -> Option<TaskResult>
Get task result
Sourcepub fn cluster_status(&self) -> ClusterStatus
pub fn cluster_status(&self) -> ClusterStatus
Get cluster status
Sourcepub fn start_health_monitoring(&self) -> JoinHandle<()>
pub fn start_health_monitoring(&self) -> JoinHandle<()>
Start health monitoring
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ClusterManager
impl RefUnwindSafe for ClusterManager
impl Send for ClusterManager
impl Sync for ClusterManager
impl Unpin for ClusterManager
impl UnwindSafe for ClusterManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more