Skip to main content

Module env_reader

Module env_reader 

Source
Expand description

Builds the typed configuration base by reading environment variables directly and decoding them into the nested configuration shape. Builds the typed configuration base from environment variables.

[DATADOG_ENV_KEYS] maps the Agent’s declared variable names to nested configuration paths; paths are not inferred by splitting names. apply_datadog_env_vars decodes each key’s first non-empty environment value using crate::env_decode. Callers choose precedence with overwrite.

Structs§

EnvKey
One modeled configuration key and how to read it from the environment.
RenamedKey
A former name of a Datadog schema setting, from the schema’s renamed_from.

Functions§

apply_datadog_env
Decodes process environment variables into modeled Datadog paths in base.
apply_datadog_env_vars
Decodes supplied environment variables into modeled Datadog paths in base, and returns the name of each variable that supplied a key of [DATADOG_ENV_KEYS], as written in vars.
apply_env_at_path
Decodes one key from the process environment into base at the supplied path.
apply_env_at_path_vars
Decodes one key from supplied environment variables into base at the supplied path.
datadog_leaf_paths
The nested path of every modeled Datadog key.
datadog_renamed_keys
Every former name of a Datadog schema setting, modeled or not.