pub struct ClusterConfig {
pub node_id: String,
pub bind_address: SocketAddr,
pub members: Vec<String>,
pub peers: Vec<ClusterPeer>,
pub failover_poll_interval_ms: Option<u64>,
pub failover_confirmations: Option<u32>,
}Expand description
Distributed-cluster membership for the haematite backend, from [store.cluster].
This is the minimal, well-defaulted seam that turns the single-node haematite
store into a distributed one (SS-2). A “cluster of one” — node_id set,
members either empty or naming only node_id, and no peers — is a valid,
non-flaky configuration: election self-quorums (quorum denominator 1) and the
node boots through the production builder as the fenced owner of its shards.
Fields§
§node_id: StringThis node’s globally-unique distribution name (e.g. node-0@127.0.0.1).
Used as the local endpoint name and the local membership identity.
bind_address: SocketAddrThe replication endpoint listen address this node binds for peer
quorum/election traffic (e.g. 127.0.0.1:7000).
members: Vec<String>The FULL cluster membership by node id — the quorum DENOMINATOR. Never the
reachable subset. May be empty or omit peers for a cluster of one, in which
case it is treated as [node_id] (denominator 1). node_id is always
counted in the denominator whether or not it appears here.
peers: Vec<ClusterPeer>Dialable peers (name + address) this node connects to for replication. A
cluster of one leaves this empty. Peers not in members do not inflate the
quorum denominator.
failover_poll_interval_ms: Option<u64>SS-5b automatic-failover poll interval in milliseconds: how often the
cluster supervisor checks each watched peer’s replication liveness.
Defaults to DEFAULT_FAILOVER_POLL_INTERVAL_MS when omitted.
failover_confirmations: Option<u32>SS-5b debounce: the number of CONSECUTIVE polls a peer must be observed
disconnected before its shards are adopted, so a transient blip does not
trigger a disruptive failover. Defaults to
DEFAULT_FAILOVER_CONFIRMATIONS when omitted; must be at least one.
Trait Implementations§
Source§impl Clone for ClusterConfig
impl Clone for ClusterConfig
Source§fn clone(&self) -> ClusterConfig
fn clone(&self) -> ClusterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClusterConfig
impl Debug for ClusterConfig
Source§impl<'de> Deserialize<'de> for ClusterConfig
impl<'de> Deserialize<'de> for ClusterConfig
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>,
impl Eq for ClusterConfig
Source§impl PartialEq for ClusterConfig
impl PartialEq for ClusterConfig
Source§fn eq(&self, other: &ClusterConfig) -> bool
fn eq(&self, other: &ClusterConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterConfig
Auto 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> 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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request