pub struct FileEventLogConfig {
pub base_dir: PathBuf,
pub max_file_size: u64,
pub write_buffer_size: usize,
pub batch_buffer_size: usize,
pub max_event_size: usize,
pub max_batch_bytes: usize,
pub flush_on_append: bool,
}Expand description
Configuration for file-based event log
Fields§
§base_dir: PathBufBase directory for event log files
max_file_size: u64Maximum size of a single log file before rotation (bytes)
write_buffer_size: usizeBuffer size for writes
batch_buffer_size: usizeMaximum size for batch write buffer (bytes)
max_event_size: usizeMaximum size of a single event payload (bytes)
max_batch_bytes: usizeMaximum total size for a single append batch (bytes)
flush_on_append: boolWhether to flush the write buffer after each append (default: true).
When true, every append_with_id / append_events_batch call flushes
the BufWriter, ensuring data reaches the OS page cache immediately.
Set to false for maximum throughput at the cost of losing in-flight
buffered events on a process crash (the OS-level file won’t be corrupted,
but un-flushed events will be lost).
Trait Implementations§
Source§impl Clone for FileEventLogConfig
impl Clone for FileEventLogConfig
Source§fn clone(&self) -> FileEventLogConfig
fn clone(&self) -> FileEventLogConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 FileEventLogConfig
impl Debug for FileEventLogConfig
Auto Trait Implementations§
impl Freeze for FileEventLogConfig
impl RefUnwindSafe for FileEventLogConfig
impl Send for FileEventLogConfig
impl Sync for FileEventLogConfig
impl Unpin for FileEventLogConfig
impl UnwindSafe for FileEventLogConfig
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