pub struct StreamConfig {
pub snapshot_ttl_ms: u64,
pub chunk_default_pages: usize,
pub chunk_min_pages: usize,
pub chunk_max_pages: usize,
pub chunk_max_rows: usize,
pub chunk_max_latency_ms: u64,
pub max_global_streams: usize,
pub max_per_principal_streams: usize,
pub default_verify: VerifyMode,
}Expand description
Frozen snapshot of the stream.* namespace at lease open. Acceptance
criterion: a red_config mutation while a stream is running does not
retroactively change the running stream’s behaviour — that is, the
per-lease config is value-typed and not a back-reference.
Fields§
§snapshot_ttl_ms: u64§chunk_default_pages: usize§chunk_min_pages: usize§chunk_max_pages: usize§chunk_max_rows: usize§chunk_max_latency_ms: u64§max_global_streams: usizeProcess-wide concurrent stream cap (issue #761 / S2).
Acquiring the (N+1)th slot is refused with
server_stream_capacity_exhausted.
max_per_principal_streams: usizePer-principal concurrent stream cap (issue #761 / S2).
Acquiring the (M+1)th slot for a single principal is refused
with principal_stream_quota_exhausted even when the global
counter still has room.
default_verify: VerifyModeIssue #765 / S6 — default end-to-end verification mode for input
streams when the open frame does not request one
(stream.integrity.default_verify, "none" per ADR 0029).
Implementations§
Source§impl StreamConfig
impl StreamConfig
Sourcepub const DEFAULT: StreamConfig
pub const DEFAULT: StreamConfig
Defaults match ADR 0029. snapshot_ttl_ms is the only key
observable mid-stream; the chunk caps only affect framing.
Sourcepub fn load(runtime: &RedDBRuntime) -> StreamConfig
pub fn load(runtime: &RedDBRuntime) -> StreamConfig
Read every stream.* key from red_config over the runtime’s KV
store. Missing keys fall back to Self::DEFAULT. Unparseable or
out-of-range values fall back silently — bad config never gets to
terminate a request that would otherwise succeed.
Sourcepub fn production_buffer_bytes(&self) -> usize
pub fn production_buffer_bytes(&self) -> usize
Page-aligned production buffer size in bytes. Acceptance criterion: “production buffer is always N × 16 KiB”.
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamConfig
impl Debug for StreamConfig
Source§impl Default for StreamConfig
impl Default for StreamConfig
Source§fn default() -> StreamConfig
fn default() -> StreamConfig
impl Copy for StreamConfig
Auto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnsafeUnpin for StreamConfig
impl UnwindSafe for StreamConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request