pub struct ClusterStats {
pub total_nodes: usize,
pub active_nodes: usize,
pub suspected_nodes: usize,
pub failed_nodes: usize,
pub replication_factor: usize,
pub partition_count: usize,
}
Expand description
Cluster statistics
Fields§
§total_nodes: usize
§active_nodes: usize
§suspected_nodes: usize
§failed_nodes: usize
§replication_factor: usize
§partition_count: usize
Implementations§
Source§impl ClusterStats
impl ClusterStats
Sourcepub fn health_score(&self) -> f64
pub fn health_score(&self) -> f64
Calculate cluster health score (0.0 to 1.0)
Sourcepub fn has_quorum(&self) -> bool
pub fn has_quorum(&self) -> bool
Check if cluster has quorum
Sourcepub fn can_tolerate_failures(&self, max_failures: usize) -> bool
pub fn can_tolerate_failures(&self, max_failures: usize) -> bool
Check if cluster can tolerate failures
Trait Implementations§
Source§impl Clone for ClusterStats
impl Clone for ClusterStats
Source§fn clone(&self) -> ClusterStats
fn clone(&self) -> ClusterStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClusterStats
impl RefUnwindSafe for ClusterStats
impl Send for ClusterStats
impl Sync for ClusterStats
impl Unpin for ClusterStats
impl UnwindSafe for ClusterStats
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