pub struct EventStoreConfig {
pub storage_dir: Option<PathBuf>,
pub snapshot_config: SnapshotConfig,
pub wal_dir: Option<PathBuf>,
pub wal_config: WALConfig,
pub compaction_config: CompactionConfig,
pub schema_registry_config: SchemaRegistryConfig,
pub system_data_dir: Option<PathBuf>,
pub bootstrap_tenant: Option<String>,
}Expand description
Configuration for EventStore
Fields§
§storage_dir: Option<PathBuf>Optional directory for persistent Parquet storage (v0.2 feature)
snapshot_config: SnapshotConfigSnapshot configuration (v0.2 feature)
wal_dir: Option<PathBuf>Optional directory for WAL (Write-Ahead Log) (v0.2 feature)
wal_config: WALConfigWAL configuration (v0.2 feature)
compaction_config: CompactionConfigCompaction configuration (v0.2 feature)
schema_registry_config: SchemaRegistryConfigSchema registry configuration (v0.5 feature)
system_data_dir: Option<PathBuf>Optional directory for system metadata storage (dogfood feature).
When set, operational metadata (tenants, config, audit) is stored
using AllSource’s own event store rather than an external database.
Defaults to {storage_dir}/__system/ when storage_dir is set.
bootstrap_tenant: Option<String>Name of the default tenant to auto-create on first boot.
Implementations§
Source§impl EventStoreConfig
impl EventStoreConfig
Sourcepub fn with_persistence(storage_dir: impl Into<PathBuf>) -> Self
pub fn with_persistence(storage_dir: impl Into<PathBuf>) -> Self
Create config with persistent storage enabled
Sourcepub fn with_snapshots(snapshot_config: SnapshotConfig) -> Self
pub fn with_snapshots(snapshot_config: SnapshotConfig) -> Self
Create config with custom snapshot settings
Sourcepub fn with_wal(wal_dir: impl Into<PathBuf>, wal_config: WALConfig) -> Self
pub fn with_wal(wal_dir: impl Into<PathBuf>, wal_config: WALConfig) -> Self
Create config with WAL enabled
Sourcepub fn with_all(
storage_dir: impl Into<PathBuf>,
snapshot_config: SnapshotConfig,
) -> Self
pub fn with_all( storage_dir: impl Into<PathBuf>, snapshot_config: SnapshotConfig, ) -> Self
Create config with both persistence and snapshots
Sourcepub fn production(
storage_dir: impl Into<PathBuf>,
wal_dir: impl Into<PathBuf>,
snapshot_config: SnapshotConfig,
wal_config: WALConfig,
compaction_config: CompactionConfig,
) -> Self
pub fn production( storage_dir: impl Into<PathBuf>, wal_dir: impl Into<PathBuf>, snapshot_config: SnapshotConfig, wal_config: WALConfig, compaction_config: CompactionConfig, ) -> Self
Create production config with all features enabled
Sourcepub fn effective_system_data_dir(&self) -> Option<PathBuf>
pub fn effective_system_data_dir(&self) -> Option<PathBuf>
Resolve the effective system data directory.
If explicitly set, returns that. Otherwise, derives from storage_dir. Returns None if neither is configured (in-memory mode).
Trait Implementations§
Source§impl Clone for EventStoreConfig
impl Clone for EventStoreConfig
Source§fn clone(&self) -> EventStoreConfig
fn clone(&self) -> EventStoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventStoreConfig
impl Debug for EventStoreConfig
Source§impl Default for EventStoreConfig
impl Default for EventStoreConfig
Source§fn default() -> EventStoreConfig
fn default() -> EventStoreConfig
Auto Trait Implementations§
impl Freeze for EventStoreConfig
impl RefUnwindSafe for EventStoreConfig
impl Send for EventStoreConfig
impl Sync for EventStoreConfig
impl Unpin for EventStoreConfig
impl UnwindSafe for EventStoreConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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