pub struct DefaultDistributedCluster { /* private fields */ }Expand description
Default implementation of a distributed cluster
Implementations§
Source§impl DefaultDistributedCluster
impl DefaultDistributedCluster
Sourcepub fn new(coordinator: NodeId, configuration: ClusterConfiguration) -> Self
pub fn new(coordinator: NodeId, configuration: ClusterConfiguration) -> Self
Create a new distributed cluster
Trait Implementations§
Source§impl Debug for DefaultDistributedCluster
impl Debug for DefaultDistributedCluster
Source§impl DistributedCluster for DefaultDistributedCluster
impl DistributedCluster for DefaultDistributedCluster
Source§fn active_nodes(&self) -> BoxFuture<'_, Result<Vec<NodeId>>>
fn active_nodes(&self) -> BoxFuture<'_, Result<Vec<NodeId>>>
Get all active nodes in the cluster
Source§fn coordinator(&self) -> &NodeId
fn coordinator(&self) -> &NodeId
Get the cluster coordinator node
Source§fn configuration(&self) -> &ClusterConfiguration
fn configuration(&self) -> &ClusterConfiguration
Get cluster configuration
Source§fn add_node(&mut self, _node_id: NodeId) -> BoxFuture<'_, Result<()>>
fn add_node(&mut self, _node_id: NodeId) -> BoxFuture<'_, Result<()>>
Add a new node to the cluster
Source§fn remove_node(&mut self, node_id: NodeId) -> BoxFuture<'_, Result<()>>
fn remove_node(&mut self, node_id: NodeId) -> BoxFuture<'_, Result<()>>
Remove a node from the cluster
Source§fn rebalance_load(&mut self) -> BoxFuture<'_, Result<()>>
fn rebalance_load(&mut self) -> BoxFuture<'_, Result<()>>
Redistribute work across cluster nodes
Source§fn cluster_health(&self) -> BoxFuture<'_, Result<ClusterHealth>>
fn cluster_health(&self) -> BoxFuture<'_, Result<ClusterHealth>>
Get cluster health status
Source§fn create_checkpoint(&self) -> BoxFuture<'_, Result<ClusterCheckpoint>>
fn create_checkpoint(&self) -> BoxFuture<'_, Result<ClusterCheckpoint>>
Create a checkpoint of cluster state
Source§fn restore_checkpoint(
&mut self,
_checkpoint: ClusterCheckpoint,
) -> BoxFuture<'_, Result<()>>
fn restore_checkpoint( &mut self, _checkpoint: ClusterCheckpoint, ) -> BoxFuture<'_, Result<()>>
Restore from a checkpoint
Auto Trait Implementations§
impl Freeze for DefaultDistributedCluster
impl RefUnwindSafe for DefaultDistributedCluster
impl Send for DefaultDistributedCluster
impl Sync for DefaultDistributedCluster
impl Unpin for DefaultDistributedCluster
impl UnwindSafe for DefaultDistributedCluster
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