pub enum SovereignRole {
Voter,
NonVoter,
}Expand description
Whether a node in a sovereign group may hold a seat in that group’s quorum — R605-F12.
This is not a placement input and not a taint. It narrows a
Membership, and the single thing that reads it is join_permitted.
Self::Voter is the default because it is what every already-stamped node
means today: before this enum existed, declaring a group was declaring
quorum eligibility, so absence has to keep meaning that or the field would
silently retire six live voters. The permissiveness is bounded by the group
still being mandatory — a box cannot drift into a quorum without an operator
naming the group first — and the camp lints the omission at the layer that
can see the whole fleet (cloud::validate::check_unroled_sovereign_members),
rather than here, where refusing to deserialize would break every node that
predates the field.
Variants§
Voter
Quorum-eligible: may be joined into its group’s cluster.
NonVoter
In the group’s blast radius — shares its upgrade cadence, its secrets,
its destruction — but never a quorum seat. Refused by join_permitted
on either side of a join.
Consequently a node stamped this way is absent from its group’s
/raft/status members map, and that absence is correct — see the
module docs’ “Reading a live cluster” section before reporting it as
declared-vs-actual drift. A prod worker holding no seat is the whole
point of the variant.
Implementations§
Source§impl SovereignRole
impl SovereignRole
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The wire/TOML spelling: "voter" / "non-voter". Matches the serde
rename so the CLI flag, the TOML value and the /raft/status JSON can
never disagree about how the value is written.
Sourcepub fn is_voter(&self) -> bool
pub fn is_voter(&self) -> bool
True for Self::Voter. Named rather than matched at call sites so the
join rule reads as one predicate.
Trait Implementations§
Source§impl Clone for SovereignRole
impl Clone for SovereignRole
Source§fn clone(&self) -> SovereignRole
fn clone(&self) -> SovereignRole
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SovereignRole
Source§impl Debug for SovereignRole
impl Debug for SovereignRole
Source§impl Default for SovereignRole
impl Default for SovereignRole
Source§fn default() -> SovereignRole
fn default() -> SovereignRole
Source§impl<'de> Deserialize<'de> for SovereignRole
impl<'de> Deserialize<'de> for SovereignRole
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>,
Source§impl Display for SovereignRole
impl Display for SovereignRole
impl Eq for SovereignRole
Source§impl FromStr for SovereignRole
impl FromStr for SovereignRole
Source§impl PartialEq for SovereignRole
impl PartialEq for SovereignRole
Source§impl Serialize for SovereignRole
impl Serialize for SovereignRole
impl StructuralPartialEq for SovereignRole
Auto Trait Implementations§
impl Freeze for SovereignRole
impl RefUnwindSafe for SovereignRole
impl Send for SovereignRole
impl Sync for SovereignRole
impl Unpin for SovereignRole
impl UnsafeUnpin for SovereignRole
impl UnwindSafe for SovereignRole
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
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.