Add YAML configuration model and loader
Config is layered: built-in defaults, then the YAML file, then BFD_* environment variables, then CLI flags. Global defaults live under a 'defaults' mapping; per-peer settings are file-only. Includes config.yaml.dist and ScriptHookSink::with_script_dir so the hooks directory is configurable.
This commit is contained in:
1 parent
0284ee17b1
commit
ea56afd2f2
6 files changed
+754
-2
No files matched your search
+5
-1
@@ -7,9 +7,11 @@ edition = "2021"
|
||||
atomic = "0.6.0"
|
||||
bytemuck = { version = "1.14.1", features = ["derive"] }
|
||||
byteorder = "1.5.0"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
clap = { version = "4", features = ["derive", "env"] }
|
||||
env_logger = "0.11.1"
|
||||
futures = "0.3.30"
|
||||
humantime = "2.4.0"
|
||||
humantime-serde = "1.1.1"
|
||||
itertools = "0.12.1"
|
||||
log = "0.4.20"
|
||||
nix = { version = "0.31.3", features = ["fs", "socket"] }
|
||||
@@ -17,5 +19,7 @@ nom = "7.1.3"
|
||||
nom-derive = "0.10.1"
|
||||
proc-bitfield = "0.3.1"
|
||||
rand = "0.8.5"
|
||||
serde = { version = "1.0.229", features = ["derive"] }
|
||||
serde_yaml_ng = "0.10.0"
|
||||
tokio = { version = "1.35.1", features = ["net", "full"] }
|
||||
tokio-timer = "0.2.13"
|
||||
Reference in new issue
Block a user