pub struct NodeHealth {
pub status: NodeStatus,
pub last_healthy_ms: u64,
pub failure_count: u32,
pub success_count: u32,
pub avg_response_ms: f64,
pub cpu_percent: f32,
pub memory_percent: f32,
pub active_connections: u32,
pub replication_lag_ms: Option<u64>,
}Expand description
Health information for a node
Fields§
§status: NodeStatusCurrent health status
last_healthy_ms: u64Last successful health check timestamp (unix millis)
failure_count: u32Consecutive failure count
success_count: u32Consecutive success count
avg_response_ms: f64Average response time in milliseconds
cpu_percent: f32CPU usage percentage
memory_percent: f32Memory usage percentage
active_connections: u32Number of active connections
replication_lag_ms: Option<u64>Replication lag in milliseconds (for bounded staleness routing) None means lag is unknown, 0 means fully synced with primary
Trait Implementations§
Source§impl Clone for NodeHealth
impl Clone for NodeHealth
Source§fn clone(&self) -> NodeHealth
fn clone(&self) -> NodeHealth
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 moreSource§impl Debug for NodeHealth
impl Debug for NodeHealth
Source§impl Default for NodeHealth
impl Default for NodeHealth
Source§impl<'de> Deserialize<'de> for NodeHealth
impl<'de> Deserialize<'de> for NodeHealth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeHealth
impl RefUnwindSafe for NodeHealth
impl Send for NodeHealth
impl Sync for NodeHealth
impl Unpin for NodeHealth
impl UnsafeUnpin for NodeHealth
impl UnwindSafe for NodeHealth
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