Skip to main content

Module config

Module config 

Source
Expand description

Config-file loaders for cli.toml and server.toml.

The typed schema lives in types; this module owns the file-system paths, env-var overrides (MANTA_CLI_CONFIG, MANTA_SERVER_CONFIG), and the loader functions that parse a config and merge MANTA_*-prefixed environment variables. See get_cli_configuration and get_server_configuration for the canonical entry points.

Modules§

types
Typed config-file schemas for cli.toml and server.toml.

Functions§

get_cli_config_file_path
Returns the CLI config file path, honoring MANTA_CLI_CONFIG if set.
get_cli_configuration
Load cli.toml. Fails loudly if the file is missing; the error message includes a minimal example and (when a legacy config.toml is detected) a field-by-field migration mapping.
get_csm_root_cert_content
Read the root CA certificate from file_path, falling back to the default config directory if the path is relative.
get_default_cache_path
Returns the default manta cache directory path (e.g. ~/.cache/manta/).
get_default_config_path
Returns the default manta config directory path (e.g. ~/.config/manta/).
get_default_manta_cli_config_file_path
Returns the default CLI config file path (e.g. ~/.config/manta/cli.toml).
get_default_manta_config_file_path
Returns the path of the legacy unified config file (e.g. ~/.config/manta/config.toml). Used only by missing_config_message to detect when a user is migrating from the pre-split layout — neither binary ever reads from this path at startup.
get_default_manta_server_config_file_path
Returns the default server config file path (e.g. ~/.config/manta/server.toml).
get_server_config_file_path
Returns the server config file path, honoring MANTA_SERVER_CONFIG if set.
get_server_configuration
Load server.toml. Fails loudly if the file is missing; the error message includes a minimal example and (when a legacy config.toml is detected) a field-by-field migration mapping.
read_config_toml
Reads the manta CLI configuration file (cli.toml) and parses it as TOML, honoring MANTA_CLI_CONFIG.
write_config_toml
Writes a DocumentMut back to the manta configuration file.