Expand description
YAML configuration: schema, parsing, defaulting, validation.
The top-level YAML document is a single-key mapping from a pool name
to a ConfPool. Config wraps both. The typical lifecycle is:
Config::parse_str(orConfig::parse_file) - parse YAML and apply structural checks.Config::finalize- apply defaults to fields that were left unset.Config::validate- run the full set of cross-field checks.
Config::test_conf is the convenience used by the -t flag of the
server binary and runs finalize + validate and returns a short
status string.
§Examples
use dynomite::conf::Config;
let yaml = r#"
dyn_o_mite:
listen: 127.0.0.1:8102
dyn_listen: 127.0.0.1:8101
tokens: '101134286'
servers:
- 127.0.0.1:22122:1
data_store: 0
mbuf_size: 16384
max_msgs: 300000
"#;
let mut cfg = Config::parse_str(yaml).unwrap();
cfg.finalize();
cfg.validate().unwrap();
assert_eq!(cfg.pool_name(), "dyn_o_mite");Structs§
- Conf
Bucket Type - Routing-property bundle attached to a key bucket.
- Conf
DynSeed - A
dyn_seeds:entry: a peer dynomite node with rack / dc / tokens. - Conf
Listen - A parsed
listen:/dyn_listen:/stats_listen:endpoint. - Conf
Pool - Pool configuration body. One per top-level YAML pool name.
- Conf
Riak - Optional Riak-mode listener / AAE knobs.
- Conf
Riak Wasm Module - One Wasm module entry inside a
ConfRiak::wasm_moduleslist. - Conf
Server - A
servers:entry: a single backing datastore endpoint. - Conf
TlsProfile - One per-DC TLS profile inside
ConfPool::peer_tls_profiles. - Config
- Top-level configuration value: a single named
ConfPool. - Observability
Config - Opt-in observability configuration.
- Servers
- Wrapper for the
servers:field that enforces the invariant of “exactly one datastore” without losing the YAML list shape. - Token
Component - One element of a comma-separated token list.
- Token
List - A list of
TokenComponents parsed from a comma-separated string.
Enums§
- Conf
Error - Errors that can occur while loading or validating a
Config. - Consistency
Level - Quorum policy for read or write paths.
- Data
Store - Datastore family selected by
data_store:. - Distribution
- Distribution algorithm selected by the pool’s
distribution:directive. - Endpoint
Kind - Address family of a
ConfListen. - Hash
Type - Hash algorithm selected by
hash:. - Secure
Server Option - Inter-node security mode selected by
secure_server_option:.
Functions§
- is_
noxu_ supported - Read the process-wide “noxu data_store is supported” flag.
- set_
noxu_ supported - Set the process-wide “noxu data_store is supported” flag.