pub struct Config {
pub bird_root: PathBuf,
pub client_id: String,
pub hot_days: u32,
pub inline_threshold: usize,
pub auto_extract: bool,
pub storage_mode: StorageMode,
pub remotes: Vec<RemoteConfig>,
pub sync: SyncConfig,
}Expand description
BIRD configuration.
Fields§
§bird_root: PathBufRoot directory for all BIRD data.
client_id: StringClient identifier for this machine.
hot_days: u32Days to keep data in hot tier before archiving.
inline_threshold: usizeThreshold in bytes for inline vs blob storage.
auto_extract: boolAutomatically extract events after shq run commands.
storage_mode: StorageModeStorage mode for writing data.
- parquet: Multi-writer safe, requires compaction (default)
- duckdb: Single-writer, no compaction needed
remotes: Vec<RemoteConfig>Remote storage configurations.
sync: SyncConfigSync configuration for push/pull operations.
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_root(bird_root: impl Into<PathBuf>) -> Self
pub fn with_root(bird_root: impl Into<PathBuf>) -> Self
Create a new config with the given BIRD_ROOT.
Sourcepub fn with_duckdb_mode(bird_root: impl Into<PathBuf>) -> Self
pub fn with_duckdb_mode(bird_root: impl Into<PathBuf>) -> Self
Create a new config with DuckDB storage mode.
Sourcepub fn default_location() -> Result<Self>
pub fn default_location() -> Result<Self>
Create a config using default BIRD_ROOT resolution.
Sourcepub fn recent_dir(&self) -> PathBuf
pub fn recent_dir(&self) -> PathBuf
Path to the recent (hot) data directory.
Sourcepub fn archive_dir(&self) -> PathBuf
pub fn archive_dir(&self) -> PathBuf
Path to the archive (cold) data directory.
Sourcepub fn invocations_dir(&self, date: &NaiveDate) -> PathBuf
pub fn invocations_dir(&self, date: &NaiveDate) -> PathBuf
Path to invocations parquet files for a given date.
Sourcepub fn outputs_dir(&self, date: &NaiveDate) -> PathBuf
pub fn outputs_dir(&self, date: &NaiveDate) -> PathBuf
Path to outputs parquet files for a given date.
Sourcepub fn sessions_dir(&self, date: &NaiveDate) -> PathBuf
pub fn sessions_dir(&self, date: &NaiveDate) -> PathBuf
Path to sessions parquet files for a given date.
Sourcepub fn extensions_dir(&self) -> PathBuf
pub fn extensions_dir(&self) -> PathBuf
Path to the DuckDB extensions directory.
Sourcepub fn blob_path(&self, hash: &str, cmd_hint: &str) -> PathBuf
pub fn blob_path(&self, hash: &str, cmd_hint: &str) -> PathBuf
Path to a specific blob file by hash and command.
Sourcepub fn event_formats_path(&self) -> PathBuf
pub fn event_formats_path(&self) -> PathBuf
Path to the event-formats.toml config file (legacy).
Sourcepub fn format_hints_path(&self) -> PathBuf
pub fn format_hints_path(&self) -> PathBuf
Path to the format-hints.toml config file.
Sourcepub fn events_dir(&self, date: &NaiveDate) -> PathBuf
pub fn events_dir(&self, date: &NaiveDate) -> PathBuf
Path to events parquet files for a given date.
Sourcepub fn get_remote(&self, name: &str) -> Option<&RemoteConfig>
pub fn get_remote(&self, name: &str) -> Option<&RemoteConfig>
Get a remote by name.
Sourcepub fn add_remote(&mut self, remote: RemoteConfig)
pub fn add_remote(&mut self, remote: RemoteConfig)
Add a remote configuration.
Sourcepub fn remove_remote(&mut self, name: &str) -> bool
pub fn remove_remote(&mut self, name: &str) -> bool
Remove a remote by name. Returns true if removed.
Sourcepub fn blob_roots(&self) -> Vec<String>
pub fn blob_roots(&self) -> Vec<String>
Get all blob roots for multi-location resolution. Returns local blobs dir first, then remote blob URLs.
Sourcepub fn auto_attach_remotes(&self) -> Vec<&RemoteConfig>
pub fn auto_attach_remotes(&self) -> Vec<&RemoteConfig>
Get remotes that should be auto-attached.