pub struct UserActivityTracker { /* private fields */ }Expand description
User activity tracking service
Implementations§
Source§impl UserActivityTracker
impl UserActivityTracker
pub async fn new( config: MonitoringConfig, metrics_collector: Arc<MetricsCollector>, ) -> Self
pub async fn start(&self) -> RragResult<()>
pub async fn stop(&self) -> RragResult<()>
pub async fn is_healthy(&self) -> bool
pub async fn track_activity(&self, activity: UserActivity) -> RragResult<()>
pub async fn get_active_sessions_count(&self) -> usize
pub async fn get_user_stats(&self, time_window_hours: i64) -> UserStats
Auto Trait Implementations§
impl Freeze for UserActivityTracker
impl !RefUnwindSafe for UserActivityTracker
impl Send for UserActivityTracker
impl Sync for UserActivityTracker
impl Unpin for UserActivityTracker
impl !UnwindSafe for UserActivityTracker
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