pub struct ClusterInfoSnapshot {
pub build: Section,
pub config: Section,
pub ring: Section,
pub peers: RowSection,
pub queues: Section,
pub gossip: Section,
pub recent_events: RowSection,
pub memory: Section,
pub fds: Section,
}Expand description
Owned snapshot ready to be rendered.
Sections are stored in the canonical render order:
build, config, ring, peers, queues, gossip,
recent_events, memory, fds. Producers should fill every
section even when the underlying data is unavailable; the
formatter happily emits empty sections so the resulting text
has a stable shape across releases.
§Examples
use dynomite::admin::cluster_info::ClusterInfoSnapshot;
let snap = ClusterInfoSnapshot::synthetic();
assert_eq!(snap.build.name(), "build");Fields§
§build: SectionBuild identity: version, git sha, build profile.
config: SectionSanitized configuration view.
ring: SectionRing distribution / vnode counts.
peers: RowSectionPer-peer rows.
queues: SectionQueue-depth gauges.
gossip: SectionGossip churn metrics.
recent_events: RowSectionBounded ring of lifecycle events.
memory: SectionMemory accounting block.
fds: SectionOpen file-descriptor accounting block.
Implementations§
Source§impl ClusterInfoSnapshot
impl ClusterInfoSnapshot
Sourcepub fn synthetic() -> Self
pub fn synthetic() -> Self
Hand-built snapshot useful for unit tests and the doc example. Every section is populated with a single representative entry.
§Examples
use dynomite::admin::cluster_info::{format_text, ClusterInfoSnapshot};
let snap = ClusterInfoSnapshot::synthetic();
let mut out = Vec::new();
format_text(&snap, &mut out).unwrap();
let text = String::from_utf8(out).unwrap();
assert!(text.contains("=== build ==="));Trait Implementations§
Source§impl Clone for ClusterInfoSnapshot
impl Clone for ClusterInfoSnapshot
Source§fn clone(&self) -> ClusterInfoSnapshot
fn clone(&self) -> ClusterInfoSnapshot
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 ClusterInfoSnapshot
impl Debug for ClusterInfoSnapshot
Source§impl Default for ClusterInfoSnapshot
impl Default for ClusterInfoSnapshot
Source§fn default() -> ClusterInfoSnapshot
fn default() -> ClusterInfoSnapshot
Returns the “default value” for a type. Read more
impl Eq for ClusterInfoSnapshot
Source§impl PartialEq for ClusterInfoSnapshot
impl PartialEq for ClusterInfoSnapshot
Source§fn eq(&self, other: &ClusterInfoSnapshot) -> bool
fn eq(&self, other: &ClusterInfoSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterInfoSnapshot
Auto Trait Implementations§
impl Freeze for ClusterInfoSnapshot
impl RefUnwindSafe for ClusterInfoSnapshot
impl Send for ClusterInfoSnapshot
impl Sync for ClusterInfoSnapshot
impl Unpin for ClusterInfoSnapshot
impl UnsafeUnpin for ClusterInfoSnapshot
impl UnwindSafe for ClusterInfoSnapshot
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
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,
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
Compare self to
key and return true if they are equal.