pub struct ReplicaNode {
pub node_id: String,
pub address: String,
pub last_seen: u64,
pub healthy: bool,
pub capacity_bytes: u64,
pub used_bytes: u64,
}Expand description
A storage node that participates in the replication cluster.
Fields§
§node_id: StringUnique identifier for the node.
address: StringNetwork address of the node.
last_seen: u64Millisecond timestamp of when the node was last observed.
healthy: boolWhether the node is currently considered healthy.
capacity_bytes: u64Total storage capacity in bytes.
used_bytes: u64Bytes currently in use.
Implementations§
Source§impl ReplicaNode
impl ReplicaNode
Sourcepub fn available_bytes(&self) -> u64
pub fn available_bytes(&self) -> u64
Returns the number of bytes available for new data.
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Returns the fraction of capacity that is used, in [0.0, 1.0].
Trait Implementations§
Source§impl Clone for ReplicaNode
impl Clone for ReplicaNode
Source§fn clone(&self) -> ReplicaNode
fn clone(&self) -> ReplicaNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReplicaNode
impl RefUnwindSafe for ReplicaNode
impl Send for ReplicaNode
impl Sync for ReplicaNode
impl Unpin for ReplicaNode
impl UnsafeUnpin for ReplicaNode
impl UnwindSafe for ReplicaNode
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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