Lamina.Server.ConfigModule (lamina v0.4.0)

Wrapper around access to a Lamina configuration module

Link to this section Summary

Functions

Call the Lamina callback on the configuration module to cast a configuration value.

Call the config_change/3 callback on the configuration module.

Call the Lamina callback on the configuration module and return a list of config keys.

Ensure that the module in question actually implements the Lamina behaviour.

Call the Lamina callback on the configuration module and return the providers.

Call the Lamina callback on the configuration module to validate a configuration value.

Link to this section Functions

Link to this function

cast(module, config_key, value)

Specs

cast(module(), atom(), any()) :: {:ok, any()} | {:error, any()}

Call the Lamina callback on the configuration module to cast a configuration value.

Link to this function

config_change(module, config_key, old_value, new_value)

Specs

config_change(module(), config_key, old_value, new_value) :: :ok | no_return()
when config_key: atom(), old_value: any(), new_value: any()

Call the config_change/3 callback on the configuration module.

Link to this function

config_keys(module)

Specs

config_keys(module()) :: [atom()]

Call the Lamina callback on the configuration module and return a list of config keys.

Link to this function

is_lamina_module(module)

Specs

is_lamina_module(module()) ::
  {:ok, module()} | {:error, Lamina.Error.NotALaminaModuleError.t()}

Ensure that the module in question actually implements the Lamina behaviour.

Link to this function

providers(module)

Specs

providers(module()) :: [{module(), keyword()}]

Call the Lamina callback on the configuration module and return the providers.

Link to this function

validate(module, config_key, value)

Specs

validate(module(), atom(), any()) :: {:ok, any()} | {:error, any()}

Call the Lamina callback on the configuration module to validate a configuration value.