Skip to main content

Module config_file

Module config_file 

Source

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§

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. prefix is the table the document starts in (normally empty).