pub struct RecordingSession {
pub session_id: [u8; 16],
pub service: String,
pub admin_key_id: String,
pub started_at: Instant,
pub last_packet_at: Instant,
pub packets: Vec<PacketMetadata>,
pub total_packets: u64,
pub running_stats: RunningStats,
}Expand description
Active recording session on the server
Fields§
§session_id: [u8; 16]Unique session ID (from VPN session)
service: StringService name being recorded (e.g. “yandex_telemost”)
admin_key_id: StringAdmin key ID that authorized this recording
started_at: InstantWhen recording started
last_packet_at: InstantWhen the most recent packet was captured
packets: Vec<PacketMetadata>Collected packet metadata (capped at MAX_RECORDING_PACKETS)
total_packets: u64Total packets observed (may exceed stored packets)
running_stats: RunningStatsIncremental statistics (always up to date)
Implementations§
Source§impl RecordingSession
impl RecordingSession
Sourcepub fn new(session_id: [u8; 16], service: String, admin_key_id: String) -> Self
pub fn new(session_id: [u8; 16], service: String, admin_key_id: String) -> Self
Create a new recording session
Sourcepub fn record(&mut self, meta: PacketMetadata)
pub fn record(&mut self, meta: PacketMetadata)
Record a packet’s metadata
Sourcepub fn has_enough_data(&self) -> bool
pub fn has_enough_data(&self) -> bool
Check if we have enough data for mask generation
Sourcepub fn duration_secs(&self) -> u64
pub fn duration_secs(&self) -> u64
Get recording duration in seconds
Sourcepub fn is_idle_timed_out(&self, idle_timeout_secs: u64) -> bool
pub fn is_idle_timed_out(&self, idle_timeout_secs: u64) -> bool
Check whether the session has been idle long enough to auto-finish.
Auto Trait Implementations§
impl Freeze for RecordingSession
impl RefUnwindSafe for RecordingSession
impl Send for RecordingSession
impl Sync for RecordingSession
impl Unpin for RecordingSession
impl UnsafeUnpin for RecordingSession
impl UnwindSafe for RecordingSession
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