pub struct PersistenceConfig {
pub enabled: bool,
pub data_dir: PathBuf,
pub segment_size_bytes: u64,
pub fsync_interval_ms: u64,
pub snapshot_every_seconds: u64,
pub snapshot_min_writes: u64,
pub compress_snapshots: bool,
pub compress_wal: bool,
pub wal_channel_capacity: usize,
pub tcp_export: WalTcpExportConfig,
}Expand description
WAL and snapshot persistence settings.
Fields§
§enabled: boolEnable WAL and snapshot persistence.
data_dir: PathBufDirectory used for WAL segments and snapshots.
segment_size_bytes: u64Approximate WAL segment size before rotation.
fsync_interval_ms: u64Maximum interval between WAL fsync calls.
snapshot_every_seconds: u64Snapshot cadence in seconds.
snapshot_min_writes: u64Minimum writes before a periodic snapshot is considered.
compress_snapshots: boolCompress snapshot files.
compress_wal: boolCompress WAL segments.
wal_channel_capacity: usizeBounded channel capacity for WAL append requests.
tcp_export: WalTcpExportConfigOptional live WAL export over TCP.
Trait Implementations§
Source§impl Clone for PersistenceConfig
impl Clone for PersistenceConfig
Source§fn clone(&self) -> PersistenceConfig
fn clone(&self) -> PersistenceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersistenceConfig
impl Debug for PersistenceConfig
Source§impl Default for PersistenceConfig
impl Default for PersistenceConfig
Source§impl<'de> Deserialize<'de> for PersistenceConfigwhere
PersistenceConfig: Default,
impl<'de> Deserialize<'de> for PersistenceConfigwhere
PersistenceConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PersistenceConfig
impl RefUnwindSafe for PersistenceConfig
impl Send for PersistenceConfig
impl Sync for PersistenceConfig
impl Unpin for PersistenceConfig
impl UnsafeUnpin for PersistenceConfig
impl UnwindSafe for PersistenceConfig
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