Skip to main content

Module config_file

Module config_file 

Source

Structs§

ConfigSettings
The settings of a rws.config.toml document, resolved to the RWS_CONFIG_* variables they set — without touching the environment.

Constants§

SETTINGS_WITHOUT_FLAG
Settings that have an RWS_CONFIG_* variable but no command-line flag. In rws.config.toml they’re written like any other key — the variable name is the table path plus key, upper-cased: [rate_limit] max_requests → RWS_CONFIG_RATE_LIMIT_MAX_REQUESTS. Settings that do have a flag are taken from CommandLineArgument::get_command_line_arg_list() instead. tests.rs checks this list against every RWS_CONFIG_* name in src/.

Functions§

collect_settings
Resolve every setting in a rws.config.toml document. prefix is the table the document starts in (normally empty).
override_environment_variables_from_config
Load rws.config.toml into the environment: filepath (relative to the working directory) when given, else the file named by RWS_CONFIG_FILE (absolute, or relative to the working directory) — the same variable proxy_config reads routes from — else rws.config.toml in the working directory.
read_config_file
Apply every setting in a rws.config.toml document to the process environment (see collect_settings). Unknown keys are reported on stderr instead of being ignored silently.