beryl/stats
Local coordinator statistics.
Snapshots are point-in-time values captured when the local coordinator services a request. They are intended for operational polling, not as an event stream. Poll no more frequently than roughly once per second so observation does not add meaningful coordinator load.
Snapshot
Section titled “Snapshot”A point-in-time snapshot of local coordinator state.
pub type SnapshotSnapshotError
Section titled “SnapshotError”Errors returned while requesting a coordinator snapshot.
pub type SnapshotError { CoordinatorUnavailable RequestTimedOut}Constructors
Section titled “Constructors”CoordinatorUnavailable
Section titled “CoordinatorUnavailable”The local coordinator is not currently running.
RequestTimedOut
Section titled “RequestTimedOut”The coordinator did not service the request within the bounded timeout.
Functions
Section titled “Functions”active_topics
Section titled “active_topics”Return the number of topics with at least one local joined socket.
pub fn active_topics(Snapshot) -> Intconnected_sockets
Section titled “connected_sockets”Return the number of sockets connected to the local coordinator.
pub fn connected_sockets(Snapshot) -> Intcoordinator_mailbox_length
Section titled “coordinator_mailbox_length”Return the coordinator mailbox length when it serviced the request.
pub fn coordinator_mailbox_length(Snapshot) -> Intjoined_socket_topic_pairs
Section titled “joined_socket_topic_pairs”Return the number of joined socket/topic pairs.
One socket joined to two topics contributes two pairs.
pub fn joined_socket_topic_pairs(Snapshot) -> Intregistered_channel_handlers
Section titled “registered_channel_handlers”Return the number of channel handlers registered with the coordinator.
pub fn registered_channel_handlers(Snapshot) -> Intsnapshot
Section titled “snapshot”Request a point-in-time snapshot from the local coordinator.
The request waits for at most approximately one second. During a
coordinator restart this returns CoordinatorUnavailable or
RequestTimedOut; an overloaded coordinator returns RequestTimedOut.
Neither condition panics. This API reports only the node represented by
channels; aggregate multi-node statistics outside Beryl.
Poll no more frequently than roughly once per second.
pub fn snapshot(beryl.Channels) -> Result(Snapshot, SnapshotError)