View Source Yggdrasil.Config (Yggdrasil v6.0.3)
This module defines the available config variables for Yggdrasil.
Link to this section Summary
Functions
Module registry.
Module registry.
Preloads all variables in a namespace if supplied.
Yggdrasil publisher options. These options are for :poolboy.
Yggdrasil publisher options. These options are for :poolboy.
Puts the value to Yggdrasil.Config.module_registry/0. Optionally, receives
the namespace.
Puts the value to Yggdrasil.Config.publisher_options/0. Optionally, receives
the namespace.
Reloads the value for Yggdrasil.Config.module_registry/0. Optionally, receives
the namespace for the variable.
Reloads the value for Yggdrasil.Config.publisher_options/0. Optionally, receives
the namespace for the variable.
Creates a template for OS environment variables given a filename.
Additionally, it can receive a list of options
Validates that all required variables are present.
Returns :ok if they are, raises if they're not.
Validates that all required variables are present.
Returns :ok if they are, {:error, errors} if they are not. errors
will be a list of all errors encountered while getting required variables.
Link to this section Functions
@spec module_registry!(Skogsra.Env.namespace()) :: atom() | no_return()
Module registry.
iex> Yggdrasil.Config.module_registry!()
:"$yggdrasil_registry"Bang version of Yggdrasil.Config.module_registry/0 (fails on error). Optionally,
receives the namespace for the variable.
@spec module_registry(Skogsra.Env.namespace()) :: {:ok, atom()} | {:error, binary()}
Module registry.
iex> Yggdrasil.Config.module_registry!()
:"$yggdrasil_registry"Calling Yggdrasil.Config.module_registry() will ensure the following:
- Binding order: [:config]
- OS environment variable: ""
- Type: :atom
- Default: :"$yggdrasil_registry"
- Required: false
- Cached: true
@spec preload(Skogsra.Env.namespace()) :: :ok
Preloads all variables in a namespace if supplied.
@spec publisher_options!(Skogsra.Env.namespace()) :: any() | no_return()
Yggdrasil publisher options. These options are for :poolboy.
iex> Yggdrasil.Config.publisher_options!()
[size: 1, max_overflow: 5]Bang version of Yggdrasil.Config.publisher_options/0 (fails on error). Optionally,
receives the namespace for the variable.
@spec publisher_options(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}
Yggdrasil publisher options. These options are for :poolboy.
iex> Yggdrasil.Config.publisher_options!()
[size: 1, max_overflow: 5]Calling Yggdrasil.Config.publisher_options() will ensure the following:
- Binding order: [:config]
- OS environment variable: ""
- Type: :any
- Default: [size: 1, max_overflow: 5]
- Required: false
- Cached: true
@spec put_module_registry(atom(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value to Yggdrasil.Config.module_registry/0. Optionally, receives
the namespace.
@spec put_publisher_options(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value to Yggdrasil.Config.publisher_options/0. Optionally, receives
the namespace.
@spec reload_module_registry(Skogsra.Env.namespace()) :: {:ok, atom()} | {:error, binary()}
Reloads the value for Yggdrasil.Config.module_registry/0. Optionally, receives
the namespace for the variable.
@spec reload_publisher_options(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}
Reloads the value for Yggdrasil.Config.publisher_options/0. Optionally, receives
the namespace for the variable.
@spec template( Path.t(), keyword() ) :: :ok | {:error, File.posix()}
Creates a template for OS environment variables given a filename.
Additionally, it can receive a list of options:
type: What kind of file it will generate (:elixir,:unix,:windows).namespace: Namespace for the variables.
@spec validate!(Skogsra.Env.namespace()) :: :ok | no_return()
Validates that all required variables are present.
Returns :ok if they are, raises if they're not.
It is possible to provide a namespace as argument (defaults to nil).
@spec validate(Skogsra.Env.namespace()) :: :ok | {:error, [binary()]}
Validates that all required variables are present.
Returns :ok if they are, {:error, errors} if they are not. errors
will be a list of all errors encountered while getting required variables.
It is possible to provide a namespace as argument (defaults to nil).