pub struct FileEventPersisterConfig {
pub directory: PathBuf,
pub max_file_size_bytes: u64,
pub rotation: RotationPolicy,
pub retention_days: u32,
pub flush_interval: Duration,
pub enabled: bool,
}Expand description
Configuration for FileEventPersister
Fields§
§directory: PathBufDirectory where event JSONL files are stored
max_file_size_bytes: u64Maximum file size in bytes (default: 100MB)
rotation: RotationPolicyFile rotation policy
retention_days: u32Number of days to retain event files (default: 30)
flush_interval: DurationHow often to flush buffered writes (default: 1s)
enabled: boolWhether event persistence is enabled
Implementations§
Source§impl FileEventPersisterConfig
impl FileEventPersisterConfig
Sourcepub fn with_directory(self, directory: impl Into<PathBuf>) -> Self
pub fn with_directory(self, directory: impl Into<PathBuf>) -> Self
Set the directory for event files
Sourcepub fn with_max_file_size(self, max_bytes: u64) -> Self
pub fn with_max_file_size(self, max_bytes: u64) -> Self
Set the maximum file size in bytes
Sourcepub fn with_rotation(self, rotation: RotationPolicy) -> Self
pub fn with_rotation(self, rotation: RotationPolicy) -> Self
Set the rotation policy
Sourcepub fn with_retention_days(self, days: u32) -> Self
pub fn with_retention_days(self, days: u32) -> Self
Set the retention period in days
Sourcepub fn with_flush_interval(self, interval: Duration) -> Self
pub fn with_flush_interval(self, interval: Duration) -> Self
Set the flush interval
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether persistence is enabled
Trait Implementations§
Source§impl Clone for FileEventPersisterConfig
impl Clone for FileEventPersisterConfig
Source§fn clone(&self) -> FileEventPersisterConfig
fn clone(&self) -> FileEventPersisterConfig
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 FileEventPersisterConfig
impl Debug for FileEventPersisterConfig
Auto Trait Implementations§
impl Freeze for FileEventPersisterConfig
impl RefUnwindSafe for FileEventPersisterConfig
impl Send for FileEventPersisterConfig
impl Sync for FileEventPersisterConfig
impl Unpin for FileEventPersisterConfig
impl UnsafeUnpin for FileEventPersisterConfig
impl UnwindSafe for FileEventPersisterConfig
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