pub struct ClusterManager { /* private fields */ }
Expand description
Comprehensive cluster management system
Implementations§
Source§impl ClusterManager
impl ClusterManager
Sourcepub fn new(config: ClusterConfiguration) -> CoreResult<Self>
pub fn new(config: ClusterConfiguration) -> CoreResult<Self>
Create new cluster manager
Sourcepub fn global() -> CoreResult<Arc<Self>>
pub fn global() -> CoreResult<Arc<Self>>
Get global cluster manager instance
Sourcepub fn start(&self) -> CoreResult<()>
pub fn start(&self) -> CoreResult<()>
Start cluster management services
Sourcepub fn register_node(&self, nodeinfo: NodeInfo) -> CoreResult<()>
pub fn register_node(&self, nodeinfo: NodeInfo) -> CoreResult<()>
Register a new node in the cluster
Sourcepub fn get_health(&self) -> CoreResult<ClusterHealth>
pub fn get_health(&self) -> CoreResult<ClusterHealth>
Get cluster health status
Sourcepub fn get_active_nodes(&self) -> CoreResult<Vec<NodeInfo>>
pub fn get_active_nodes(&self) -> CoreResult<Vec<NodeInfo>>
Get list of active nodes
Sourcepub fn get_availablenodes(&self) -> CoreResult<HashMap<String, NodeInfo>>
pub fn get_availablenodes(&self) -> CoreResult<HashMap<String, NodeInfo>>
Get available nodes (returns nodeid -> nodeinfo mapping)
Sourcepub fn get_total_capacity(&self) -> CoreResult<ComputeCapacity>
pub fn get_total_capacity(&self) -> CoreResult<ComputeCapacity>
Get total cluster compute capacity
Sourcepub fn submit_task(&self, task: DistributedTask) -> CoreResult<TaskId>
pub fn submit_task(&self, task: DistributedTask) -> CoreResult<TaskId>
Submit a distributed task to the cluster
Sourcepub fn get_cluster_statistics(&self) -> CoreResult<ClusterStatistics>
pub fn get_cluster_statistics(&self) -> CoreResult<ClusterStatistics>
Get cluster statistics
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