pub struct SegmentConfig {
pub max_batch_events: usize,
pub flush_interval_secs: u64,
pub max_size_bytes: u64,
pub compression_level: i32,
pub cipher: Option<Box<dyn SegmentCipher>>,
}Expand description
Configuration knobs for SegmentBuffer.
Fields§
§max_batch_events: usizeMax events accumulated in RAM before auto-flush (default: 256).
flush_interval_secs: u64Max seconds between flushes. An append after this interval triggers a flush even if the batch threshold hasn’t been reached (default: 5s).
max_size_bytes: u64Max total disk usage before the buffer reports overload pressure (default: 10 GB).
compression_level: i32zstd compression level (1-22; 3 is fast with a good ratio).
cipher: Option<Box<dyn SegmentCipher>>Optional cipher for encrypting segment files at rest. When None,
segments are written as plaintext zstd+CBOR.
Trait Implementations§
Source§impl Debug for SegmentConfig
impl Debug for SegmentConfig
Auto Trait Implementations§
impl !RefUnwindSafe for SegmentConfig
impl !UnwindSafe for SegmentConfig
impl Freeze for SegmentConfig
impl Send for SegmentConfig
impl Sync for SegmentConfig
impl Unpin for SegmentConfig
impl UnsafeUnpin for SegmentConfig
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