Expand description
Layered config loader.
Precedence (later overrides earlier):
Defaults < File < EnvVars < CLIMatches JSS src/config.js:211-239. Sprint 11 (row 120-124) closes
the remaining gap by adding the CLI overlay, YAML/TOML file support
(via the config-loader feature), and the full JSS env-var map.
The loader:
- Walks the registered sources in order.
- Resolves each into a
serde_json::Valuetree. - Deep-merges each overlay into the accumulator.
- Deserialises into
ServerConfig. - Runs
ServerConfig::validateand returns the snapshot.
Unknown JSON fields are tolerated (every sub-struct uses
#[serde(default)]), matching the “forward-compat with newer JSS
releases” invariant in the bounded-context doc.
Structs§
- CliArgs
- CLI-derived overlay values. Each field is
Option<_>so the operator can leave every flag unset (yielding a no-op overlay). - Config
Loader - Builder for a layered config load.