pub struct RealtimeConfig {
pub max_connections_per_context: usize,
pub heartbeat_interval: Duration,
pub idle_timeout: Duration,
pub max_subscriptions_per_entity: usize,
pub event_channel_capacity: usize,
pub token_revalidation_interval: Duration,
pub max_consecutive_drops: usize,
pub connection_event_capacity: usize,
}Expand description
Configuration for the realtime WebSocket server.
Fields§
§max_connections_per_context: usizeMaximum concurrent connections per security context hash (default: 10).
heartbeat_interval: DurationInterval between server heartbeat pings (default: 30s).
idle_timeout: DurationDisconnect after this duration of inactivity (default: 60s).
max_subscriptions_per_entity: usizeMaximum subscriptions per entity across all connections (default: 10,000).
event_channel_capacity: usizeBounded channel capacity for the observer-to-pipeline event channel (default: 10,000).
token_revalidation_interval: DurationHow often to re-validate JWT tokens (default: same as heartbeat_interval).
Per D14: check JWT on each heartbeat.
max_consecutive_drops: usizeConsecutive per-connection delivery failures before kicking the client with close code 4002 “slow consumer” (default: 50).
connection_event_capacity: usizeCapacity of the per-connection event channel (default: 256).
Trait Implementations§
Source§impl Clone for RealtimeConfig
impl Clone for RealtimeConfig
Source§fn clone(&self) -> RealtimeConfig
fn clone(&self) -> RealtimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RealtimeConfig
impl Debug for RealtimeConfig
Auto Trait Implementations§
impl Freeze for RealtimeConfig
impl RefUnwindSafe for RealtimeConfig
impl Send for RealtimeConfig
impl Sync for RealtimeConfig
impl Unpin for RealtimeConfig
impl UnsafeUnpin for RealtimeConfig
impl UnwindSafe for RealtimeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more