pub struct EventLogConfig {
pub partition: String,
pub items_per_section: NonZeroU64,
pub event_cfg: EventCfg,
pub page_size: NonZeroU16,
pub page_cache_pages: NonZeroUsize,
pub write_buffer: NonZeroUsize,
}Expand description
Configuration for opening an EventLog.
Most fields mirror the underlying journal’s tuning knobs and have sensible
defaults via EventLogConfig::for_partition; only the partition
(which conversation’s log) is mandatory.
Fields§
§partition: StringStorage partition name — one per conversation. Sub-partitions for the data and offset indexes are derived from it by the journal.
items_per_section: NonZeroU64Number of events stored per journal section. Sections roll over at this count; only the final (partial) section is replayed on open to recover the exact size. Immutable once a partition exists — changing it across restarts corrupts the log.
event_cfg: EventCfgDecode-time bounds applied to each event during EventLog::replay.
page_size: NonZeroU16Page size for the read cache over the underlying storage blobs.
page_cache_pages: NonZeroUsizePage cache capacity, in pages.
write_buffer: NonZeroUsizePer-section write buffer size, in bytes.
Implementations§
Source§impl EventLogConfig
impl EventLogConfig
Sourcepub fn for_partition(partition: impl Into<String>) -> Self
pub fn for_partition(partition: impl Into<String>) -> Self
Build a config for partition with defaults for every other field.
Defaults: 1024 events per section, EventCfg::DEFAULT decode bounds,
a 16 KiB page size with a 64-page cache, and a 64 KiB write buffer.
Trait Implementations§
Source§impl Clone for EventLogConfig
impl Clone for EventLogConfig
Source§fn clone(&self) -> EventLogConfig
fn clone(&self) -> EventLogConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EventLogConfig
impl RefUnwindSafe for EventLogConfig
impl Send for EventLogConfig
impl Sync for EventLogConfig
impl Unpin for EventLogConfig
impl UnsafeUnpin for EventLogConfig
impl UnwindSafe for EventLogConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 more