pub struct RegistryConfig {
pub broadcast_capacity: usize,
pub publisher_grace_period: Duration,
pub idle_stream_timeout: Duration,
pub max_gop_size: usize,
pub cleanup_interval: Duration,
pub max_consecutive_lag_events: u32,
pub lag_threshold_low: u64,
}Expand description
Configuration for the stream registry
Fields§
§broadcast_capacity: usizeCapacity of the broadcast channel per stream
At 30fps, 128 frames is about 4 seconds of video buffer. If subscribers fall behind more than this, they’ll receive a Lagged error.
publisher_grace_period: DurationGrace period to keep stream alive after publisher disconnects
If the publisher reconnects within this period, subscribers continue without interruption. This handles brief network hiccups.
idle_stream_timeout: DurationTimeout for idle streams with no publisher and no subscribers
max_gop_size: usizeMaximum GOP buffer size in bytes per stream
cleanup_interval: DurationInterval for running cleanup tasks
max_consecutive_lag_events: u32Number of lag events before disconnecting a slow subscriber
lag_threshold_low: u64Lag threshold (frames) below which we continue normally
Implementations§
Source§impl RegistryConfig
impl RegistryConfig
Sourcepub fn broadcast_capacity(self, capacity: usize) -> Self
pub fn broadcast_capacity(self, capacity: usize) -> Self
Set the broadcast channel capacity
Sourcepub fn publisher_grace_period(self, duration: Duration) -> Self
pub fn publisher_grace_period(self, duration: Duration) -> Self
Set the publisher grace period
Sourcepub fn idle_stream_timeout(self, duration: Duration) -> Self
pub fn idle_stream_timeout(self, duration: Duration) -> Self
Set the idle stream timeout
Sourcepub fn max_gop_size(self, size: usize) -> Self
pub fn max_gop_size(self, size: usize) -> Self
Set the maximum GOP buffer size
Trait Implementations§
Source§impl Clone for RegistryConfig
impl Clone for RegistryConfig
Source§fn clone(&self) -> RegistryConfig
fn clone(&self) -> RegistryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more