#[non_exhaustive]pub struct ClusterOwnershipDiagnostics {
pub resolver: &'static str,
pub resolutions: u64,
pub no_owner: u64,
pub stamp: u64,
}Expand description
Ownership diagnostics visible from a cluster control plane.
This is intentionally separate from ClusterDiagnostics so ownership
counters can evolve without adding fields to the externally constructible
runtime diagnostics snapshot.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resolver: &'static strResolver name used by the control plane.
resolutions: u64Number of ownership resolution attempts handled by this control plane.
no_owner: u64Number of ownership resolutions that found no admitted member owner.
stamp: u64Monotonic ownership table stamp for stale-view detection.
Implementations§
Source§impl ClusterOwnershipDiagnostics
impl ClusterOwnershipDiagnostics
Sourcepub fn new(
resolver: &'static str,
resolutions: u64,
no_owner: u64,
stamp: u64,
) -> Self
pub fn new( resolver: &'static str, resolutions: u64, no_owner: u64, stamp: u64, ) -> Self
Create an ownership diagnostics snapshot.
Sourcepub fn owner_found(&self) -> u64
pub fn owner_found(&self) -> u64
Number of ownership resolutions that selected an owner.
Sourcepub fn has_resolutions(&self) -> bool
pub fn has_resolutions(&self) -> bool
Return whether any ownership resolution has been attempted.
Sourcepub fn owner_found_ratio(&self) -> Option<f64>
pub fn owner_found_ratio(&self) -> Option<f64>
Ratio of ownership resolutions that found an admitted owner.
Trait Implementations§
Source§impl Clone for ClusterOwnershipDiagnostics
impl Clone for ClusterOwnershipDiagnostics
Source§fn clone(&self) -> ClusterOwnershipDiagnostics
fn clone(&self) -> ClusterOwnershipDiagnostics
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 moreSource§impl Debug for ClusterOwnershipDiagnostics
impl Debug for ClusterOwnershipDiagnostics
Source§impl Deserialize<'static> for ClusterOwnershipDiagnostics
impl Deserialize<'static> for ClusterOwnershipDiagnostics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ClusterOwnershipDiagnostics
Source§impl PartialEq for ClusterOwnershipDiagnostics
impl PartialEq for ClusterOwnershipDiagnostics
Source§fn eq(&self, other: &ClusterOwnershipDiagnostics) -> bool
fn eq(&self, other: &ClusterOwnershipDiagnostics) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterOwnershipDiagnostics
Auto Trait Implementations§
impl Freeze for ClusterOwnershipDiagnostics
impl RefUnwindSafe for ClusterOwnershipDiagnostics
impl Send for ClusterOwnershipDiagnostics
impl Sync for ClusterOwnershipDiagnostics
impl Unpin for ClusterOwnershipDiagnostics
impl UnsafeUnpin for ClusterOwnershipDiagnostics
impl UnwindSafe for ClusterOwnershipDiagnostics
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<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
Compare self to
key and return true if they are equal.