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).
Sourcepub fn from_env() -> (Self, &'static str)
pub fn from_env() -> (Self, &'static str)
Build config from environment variables.
Reads ALLSOURCE_DATA_DIR, ALLSOURCE_STORAGE_DIR, ALLSOURCE_WAL_DIR,
and ALLSOURCE_WAL_ENABLED to determine persistence mode.
Returns (config, description) where description is a human-readable
summary of the persistence mode for logging.
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 more