pub struct RelayStatisticsCollector { /* private fields */ }Expand description
Comprehensive relay statistics collector that aggregates stats from all relay components
Implementations§
Source§impl RelayStatisticsCollector
impl RelayStatisticsCollector
Sourcepub fn update_session_count(&self, active: u32, total: u64)
pub fn update_session_count(&self, active: u32, total: u64)
Update session count (called by MASQUE relay server)
Sourcepub fn update_connection_count(&self, active: u32)
pub fn update_connection_count(&self, active: u32)
Update connection count (called by MASQUE relay components)
Sourcepub fn add_bytes_transferred(&self, sent: u64, received: u64)
pub fn add_bytes_transferred(&self, sent: u64, received: u64)
Update bytes transferred (called by MASQUE relay components)
Sourcepub fn update_queue_stats(&self, stats: &RelayStats)
pub fn update_queue_stats(&self, stats: &RelayStats)
Update queue statistics (called from endpoint)
Sourcepub fn record_auth_attempt(&self, success: bool, error: Option<&str>)
pub fn record_auth_attempt(&self, success: bool, error: Option<&str>)
Record an authentication attempt
Sourcepub fn record_rate_limit(&self, allowed: bool)
pub fn record_rate_limit(&self, allowed: bool)
Record a rate limiting decision
Sourcepub fn record_error(&self, error_type: &str)
pub fn record_error(&self, error_type: &str)
Record an error occurrence
Sourcepub fn collect_statistics(&self) -> RelayStatistics
pub fn collect_statistics(&self) -> RelayStatistics
Collect comprehensive statistics from all sources
Sourcepub fn get_last_snapshot(&self) -> RelayStatistics
pub fn get_last_snapshot(&self) -> RelayStatistics
Get the last collected statistics snapshot
Trait Implementations§
Source§impl Clone for RelayStatisticsCollector
impl Clone for RelayStatisticsCollector
Source§impl Debug for RelayStatisticsCollector
impl Debug for RelayStatisticsCollector
Auto Trait Implementations§
impl !Freeze for RelayStatisticsCollector
impl RefUnwindSafe for RelayStatisticsCollector
impl Send for RelayStatisticsCollector
impl Sync for RelayStatisticsCollector
impl Unpin for RelayStatisticsCollector
impl UnwindSafe for RelayStatisticsCollector
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