pub struct ClusterConfig {
pub node_id: u64,
pub listen_addr: SocketAddr,
pub seed_nodes: Vec<SocketAddr>,
pub num_groups: u64,
pub replication_factor: usize,
pub data_dir: PathBuf,
pub force_bootstrap: bool,
pub join_retry: JoinRetryPolicy,
pub swim_udp_addr: Option<SocketAddr>,
}Expand description
Configuration for cluster formation.
Fields§
§node_id: u64This node’s unique ID.
listen_addr: SocketAddrAddress to listen on for Raft RPCs.
seed_nodes: Vec<SocketAddr>Seed node addresses for bootstrap/join.
num_groups: u64Number of Raft groups to create on bootstrap.
replication_factor: usizeReplication factor (number of replicas per group).
data_dir: PathBufData directory for persistent Raft log storage.
force_bootstrap: boolOperator escape hatch: bypass the probe phase and bootstrap this node unconditionally even if it is not the lexicographically smallest seed.
Set this only on disaster recovery when the designated
bootstrapper is permanently unreachable. Requires listen_addr
to be present in seed_nodes (enforced at the caller’s config
validation layer).
join_retry: JoinRetryPolicyRetry policy for the join loop. Defaults to production values
(8 attempts, 32 s ceiling). Tests override this with a
faster policy.
swim_udp_addr: Option<SocketAddr>Optional UDP bind address for the SWIM failure detector. None
disables SWIM entirely — cluster startup then relies solely on
the existing raft transport for membership observations. When
Some, the operator is expected to spawn SWIM separately via
crate::spawn_swim after the cluster is up and feed the
seed list from seed_nodes.
Trait Implementations§
Source§impl Clone for ClusterConfig
impl Clone for ClusterConfig
Source§fn clone(&self) -> ClusterConfig
fn clone(&self) -> ClusterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ClusterConfig
impl RefUnwindSafe for ClusterConfig
impl Send for ClusterConfig
impl Sync for ClusterConfig
impl Unpin for ClusterConfig
impl UnsafeUnpin for ClusterConfig
impl UnwindSafe for ClusterConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.