pub struct NodeStats {
pub health: NodeHealth,
pub replication_lag_ms: u64,
pub connections: u64,
pub avg_latency_ms: f64,
pub requests: u64,
pub failures: u64,
}Expand description
Node statistics
Fields§
§health: NodeHealthNode health state
replication_lag_ms: u64Replication lag (ms)
connections: u64Current connections
avg_latency_ms: f64Average latency (ms)
requests: u64Total requests
failures: u64Total failures
Implementations§
Source§impl NodeStats
impl NodeStats
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if node is healthy (backward compatibility)
Sourcepub fn can_serve_reads(&self) -> bool
pub fn can_serve_reads(&self) -> bool
Check if node can serve reads
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeStats
impl RefUnwindSafe for NodeStats
impl Send for NodeStats
impl Sync for NodeStats
impl Unpin for NodeStats
impl UnsafeUnpin for NodeStats
impl UnwindSafe for NodeStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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