pub struct CoordinatorConfig {
pub node_id: String,
pub bind_addr: String,
pub peers: Vec<String>,
pub heartbeat_interval_ms: u64,
pub health_timeout_ms: u64,
}Expand description
Configuration for a DistributedCoordinator instance.
Fields§
§node_id: StringIdentifier for this node.
bind_addr: StringAddress this node listens on ("host:port").
peers: Vec<String>Peer addresses to seed the cluster with.
heartbeat_interval_ms: u64How often to send heartbeats (milliseconds).
health_timeout_ms: u64Age after which a node is considered unhealthy (milliseconds).
Implementations§
Source§impl CoordinatorConfig
impl CoordinatorConfig
Sourcepub fn local_default(node_id: impl Into<String>) -> Self
pub fn local_default(node_id: impl Into<String>) -> Self
Sensible defaults for a single-node development setup.
Trait Implementations§
Source§impl Clone for CoordinatorConfig
impl Clone for CoordinatorConfig
Source§fn clone(&self) -> CoordinatorConfig
fn clone(&self) -> CoordinatorConfig
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 CoordinatorConfig
impl RefUnwindSafe for CoordinatorConfig
impl Send for CoordinatorConfig
impl Sync for CoordinatorConfig
impl Unpin for CoordinatorConfig
impl UnsafeUnpin for CoordinatorConfig
impl UnwindSafe for CoordinatorConfig
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