pub struct AdminSnapshot {
pub broker_instance: String,
pub broker_pid: u32,
pub generated_at_unix_ms: u64,
pub uptime: Duration,
pub accepting_hello: bool,
pub connections_open: u64,
pub backends: Vec<AdminBackend>,
pub spawn_budgets: Vec<AdminSpawnBudget>,
pub fd_pressure_demoted: bool,
pub inode_pressure: AdminInodePressure,
}Expand description
Snapshot consumed by admin verb renderers.
Fields§
§broker_instance: StringBroker instance identifier.
broker_pid: u32Broker process id.
generated_at_unix_ms: u64Snapshot generation timestamp.
uptime: DurationTime since broker start.
accepting_hello: boolWhether new Hello requests are accepted.
connections_open: u64Open control-plane connections.
backends: Vec<AdminBackend>Known backend rows.
spawn_budgets: Vec<AdminSpawnBudget>Known spawn budget rows.
fd_pressure_demoted: boolWhether the broker self-demoted under fd pressure (#390).
inode_pressure: AdminInodePressureInode usage of the daemon data dir filesystem (#390).
Implementations§
Source§impl AdminSnapshot
impl AdminSnapshot
Sourcepub fn local_not_serving() -> Self
pub fn local_not_serving() -> Self
Local process snapshot used until pipe-backed admin transport lands.
Sourcepub fn from_registry(
broker_instance: impl Into<String>,
uptime: Duration,
accepting_hello: bool,
connections_open: u64,
registry: &BackendRegistry,
spawn_budgets: &[SpawnBudgetSnapshot],
) -> Self
pub fn from_registry( broker_instance: impl Into<String>, uptime: Duration, accepting_hello: bool, connections_open: u64, registry: &BackendRegistry, spawn_budgets: &[SpawnBudgetSnapshot], ) -> Self
Build a live snapshot from broker state.
Sourcepub fn from_registry_at(
broker_instance: impl Into<String>,
broker_pid: u32,
generated_at_unix_ms: u64,
uptime: Duration,
accepting_hello: bool,
connections_open: u64,
registry: &BackendRegistry,
spawn_budgets: &[SpawnBudgetSnapshot],
) -> Self
pub fn from_registry_at( broker_instance: impl Into<String>, broker_pid: u32, generated_at_unix_ms: u64, uptime: Duration, accepting_hello: bool, connections_open: u64, registry: &BackendRegistry, spawn_budgets: &[SpawnBudgetSnapshot], ) -> Self
Testable variant of Self::from_registry with deterministic metadata.
Sourcepub fn with_fd_pressure_demoted(self, demoted: bool) -> Self
pub fn with_fd_pressure_demoted(self, demoted: bool) -> Self
Record the broker’s fd-pressure demotion state (#390).
Sourcepub fn with_inode_pressure(self, inode_pressure: AdminInodePressure) -> Self
pub fn with_inode_pressure(self, inode_pressure: AdminInodePressure) -> Self
Override the inode-pressure row (tests / deterministic snapshots).
Trait Implementations§
Source§impl Clone for AdminSnapshot
impl Clone for AdminSnapshot
Source§fn clone(&self) -> AdminSnapshot
fn clone(&self) -> AdminSnapshot
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 moreAuto Trait Implementations§
impl Freeze for AdminSnapshot
impl RefUnwindSafe for AdminSnapshot
impl Send for AdminSnapshot
impl Sync for AdminSnapshot
impl Unpin for AdminSnapshot
impl UnsafeUnpin for AdminSnapshot
impl UnwindSafe for AdminSnapshot
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more