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§
- Audit
Config - AUDIT-tier delivery policy. Phase-1 ships only the type shape so
obs.yamlfiles already validate; the runtime implementation (bounded blocking + binary spool + recovery) lands in Phase 3 task 3.12. Spec 11 § 6.4 + spec 15 § 2. - Events
Config - 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. - Events
Config Builder - Builder for
EventsConfig. - Limits
Config - Per-event byte limits (spec 15 § 2 + spec 11 § 6.2).
- Queues
Config - Per-tier mpsc capacity (spec 15 § 2 + spec 11 § 4).
- Sampling
Config - Sampling config (spec 15 § 2 + spec 13 § 6).
- Service
Config - Service identity (spec 15 § 2 + spec 11 § 7).
- Sinks
Config - Per-sink configuration. Phase-1 ships only the type shape so
obs.yamlfiles already validate; the per-sink fields are filled in by their respective Phase-3+ implementations. Spec 15 § 2 + spec 20 / spec 22.
Enums§
- Audit
Failure Mode - Behaviour when AUDIT delivery cannot complete (spec 11 § 6.4).
- Audit
Fsync Mode - fsync policy applied to the AUDIT spool after each append. Spec 11 § 6.4 + decision D6-5.
- Config
Error - Errors returned by
EventsConfig::validate/ loaders.