ExUtcp.Config (ex_utcp v0.2.8)
View SourceConfiguration management for UTCP client.
Handles variable substitution, environment variable loading, and provider configuration.
Summary
Functions
Gets a variable value from the configuration, checking in order
Loads variables from a .env file.
Creates a new client configuration with default values.
Substitutes variables in a value using the pattern ${VAR} or $VAR.
Functions
@spec get_variable(ExUtcp.Types.client_config(), String.t()) :: {:ok, String.t()} | {:error, ExUtcp.Types.variable_not_found()}
Gets a variable value from the configuration, checking in order:
- Inline variables
- Loaded variable sources
- System environment variables
@spec load_from_env_file(String.t()) :: {:ok, %{required(String.t()) => String.t()}} | {:error, any()}
Loads variables from a .env file.
@spec new(keyword()) :: ExUtcp.Types.client_config()
Creates a new client configuration with default values.
@spec substitute_variables(ExUtcp.Types.client_config(), any()) :: any()
Substitutes variables in a value using the pattern ${VAR} or $VAR.