pub struct ClusterPeer {
pub name: String,
pub address: SocketAddr,
pub grpc_address: Option<SocketAddr>,
pub owned_shards: Vec<usize>,
}Expand description
One dialable cluster peer: its distribution name and replication address.
Fields§
§name: StringThe peer’s globally-unique distribution name (matches its node_id).
address: SocketAddrThe peer’s replication endpoint address to dial.
grpc_address: Option<SocketAddr>The peer’s gRPC client-API address, for request forwarding (R-2/R-3).
This is DISTINCT from address (the replication/quorum endpoint): a
forwarded client signal/query/cancel is dialed here, not on the
replication port. Absent (the default) means the peer is not
forwardable — its shards still resolve to a remote owner, but routing
falls back to returning the typed NotOwner instead of forwarding (R-3).
owned_shards: Vec<usize>The distribution shards this peer owns. Empty (the default) means the
operator did not declare the peer’s shards, so the SS-5b cluster
supervisor cannot adopt them automatically when the peer dies — automatic
failover for a peer requires its owned_shards to be declared here so the
survivor knows exactly which shards to elect + resume. Declaring them does
not change replication or quorum; it only tells the supervisor what to
adopt on this peer’s death.
Trait Implementations§
Source§impl Clone for ClusterPeer
impl Clone for ClusterPeer
Source§fn clone(&self) -> ClusterPeer
fn clone(&self) -> ClusterPeer
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 ClusterPeer
impl Debug for ClusterPeer
Source§impl<'de> Deserialize<'de> for ClusterPeer
impl<'de> Deserialize<'de> for ClusterPeer
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 ClusterPeer
Source§impl PartialEq for ClusterPeer
impl PartialEq for ClusterPeer
impl StructuralPartialEq for ClusterPeer
Auto Trait Implementations§
impl Freeze for ClusterPeer
impl RefUnwindSafe for ClusterPeer
impl Send for ClusterPeer
impl Sync for ClusterPeer
impl Unpin for ClusterPeer
impl UnsafeUnpin for ClusterPeer
impl UnwindSafe for ClusterPeer
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§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<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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
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::Request