Rust referencezer0-secret-stream
zer0-secret-stream · metrics
Source declarations, signatures and documentation for metrics.
Source: sigil/weave/network/zer0-secret-stream/src/metrics.rs. SHA-256: 10f4ba6ff9a8a371f09c4ebaf6413765b5b4866fd1f1c81091997167a965da01.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
metrics::SecretStreamMetrics
#[derive(Debug, Default)]
pub struct SecretStreamMetrics {
pub bytes_in_total: AtomicU64,
pub bytes_out_total: AtomicU64,
pub frames_in_total: AtomicU64,
pub frames_out_total: AtomicU64,
pub keepalives_sent_total: AtomicU64,
pub keepalives_recv_total: AtomicU64,
/// Completed cryptographic rekeys only.
///
/// Protocol 1.0 defines no rekey transition, so this remains zero until a
/// separately specified and interoperable rekey protocol is implemented.
pub rekeys_total: AtomicU64,
pub drops_message_too_large_total: AtomicU64,
pub drops_queue_full_total: AtomicU64,
pub timeouts_idle_total: AtomicU64
}Source line: 6.
metrics::SecretStreamMetrics::snapshot
pub fn snapshot(&self) -> SecretStreamMetricsSnapshot;Source line: 24.
metrics::SecretStreamMetrics::export_prometheus_text
Export a Prometheus-like plain text for quick scraping
pub fn export_prometheus_text(&self, namespace: &str) -> String;Source line: 42.
metrics::SecretStreamMetricsSnapshot
#[derive(Debug, Clone, Copy)]
pub struct SecretStreamMetricsSnapshot {
pub bytes_in_total: u64,
pub bytes_out_total: u64,
pub frames_in_total: u64,
pub frames_out_total: u64,
pub keepalives_sent_total: u64,
pub keepalives_recv_total: u64,
pub rekeys_total: u64,
pub drops_message_too_large_total: u64,
pub drops_queue_full_total: u64,
pub timeouts_idle_total: u64
}Source line: 81.