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 register_session_manager(&self, session_manager: Arc<SessionManager>)
pub fn register_session_manager(&self, session_manager: Arc<SessionManager>)
Register a session manager for statistics collection
Sourcepub fn register_connection(
&self,
session_id: u32,
connection: Arc<RelayConnection>,
)
pub fn register_connection( &self, session_id: u32, connection: Arc<RelayConnection>, )
Register a relay connection for statistics collection
Sourcepub fn unregister_connection(&self, session_id: u32)
pub fn unregister_connection(&self, session_id: u32)
Unregister a relay connection
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§fn clone(&self) -> RelayStatisticsCollector
fn clone(&self) -> RelayStatisticsCollector
Returns a duplicate of the value. Read more
1.0.0 · 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 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