pub struct NodeInfo {
pub id: String,
pub name: String,
pub is_primary: bool,
pub sync_mode: SyncMode,
pub capabilities: NodeCapabilities,
pub current_load: f64,
pub current_latency_ms: u64,
pub indexes_in_memory: Vec<String>,
}Expand description
Node information for routing
Fields§
§id: StringNode identifier
name: StringNode name
is_primary: boolIs this the primary node
sync_mode: SyncModeSync mode
capabilities: NodeCapabilitiesNode capabilities
current_load: f64Current load (0.0 - 1.0)
current_latency_ms: u64Current latency in milliseconds
indexes_in_memory: Vec<String>Indexes loaded in memory
Implementations§
Source§impl NodeInfo
impl NodeInfo
Sourcepub fn as_primary(self) -> Self
pub fn as_primary(self) -> Self
Set as primary
Sourcepub fn with_sync_mode(self, mode: SyncMode) -> Self
pub fn with_sync_mode(self, mode: SyncMode) -> Self
Set sync mode
Sourcepub fn with_capabilities(self, caps: NodeCapabilities) -> Self
pub fn with_capabilities(self, caps: NodeCapabilities) -> Self
Set capabilities
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeInfo
impl RefUnwindSafe for NodeInfo
impl Send for NodeInfo
impl Sync for NodeInfo
impl Unpin for NodeInfo
impl UnsafeUnpin for NodeInfo
impl UnwindSafe for NodeInfo
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