Skip to main content

Module config

Module config 

Source
Expand description

EventsConfig — runtime-tunable configuration loaded from obs.yaml and exposed via ArcSwap for live reload. Spec 15 + spec 93 P0-9.

The loader uses synchronous std::fs because config loading runs once at startup (and on SIGHUP / file-watcher events on cold-ish paths); switching to tokio::fs would require either an async constructor or a block_on round-trip. The crate’s clippy lint against std::fs is intentionally allowed here for that reason.

Structs§

AuditConfig
AUDIT-tier delivery policy. Phase-1 ships only the type shape so obs.yaml files already validate; the runtime implementation (bounded blocking + binary spool + recovery) lands in Phase 3 task 3.12. Spec 11 § 6.4 + spec 15 § 2.
EventsConfig
The complete config tree. Every field is optional so a config file can be a single line if the user only cares to override filter.
EventsConfigBuilder
Builder for EventsConfig.
LimitsConfig
Per-event byte limits (spec 15 § 2 + spec 11 § 6.2).
QueuesConfig
Per-tier mpsc capacity (spec 15 § 2 + spec 11 § 4).
SamplingConfig
Sampling config (spec 15 § 2 + spec 13 § 6).
ServiceConfig
Service identity (spec 15 § 2 + spec 11 § 7).
SinksConfig
Per-sink configuration. Phase-1 ships only the type shape so obs.yaml files already validate; the per-sink fields are filled in by their respective Phase-3+ implementations. Spec 15 § 2 + spec 20 / spec 22.

Enums§

AuditFailureMode
Behaviour when AUDIT delivery cannot complete (spec 11 § 6.4).
AuditFsyncMode
fsync policy applied to the AUDIT spool after each append. Spec 11 § 6.4 + decision D6-5.
ConfigError
Errors returned by EventsConfig::validate / loaders.