Yggdrasil v4.1.3 Yggdrasil.Settings View Source

This module defines the available settings for Yggdrasil.

Use h Yggdrasil.Settings.<name of the environment variable> to get more information about every declaration in this file.

Link to this section Summary

Functions

Yggdrasil publisher options. This options are for :poolboy. Defaults to [size: 5, max_overflow: 10]

Yggdrasil publisher options. This options are for :poolboy. Defaults to [size: 5, max_overflow: 10]

Pub-sub adapter to use for channels. Default value is Phoenix.PubSub.PG2

Pub-sub adapter to use for channels. Default value is Phoenix.PubSub.PG2

Pub-sub name. By default is Yggdrasil.PubSub

Pub-sub name. By default is Yggdrasil.PubSub

Pub-sub options. By default are [pool_size: 1]

Pub-sub options. By default are [pool_size: 1]

Link to this section Functions

Link to this function yggdrasil_module_registry(namespace \\ nil, type \\ :run) View Source
yggdrasil_module_registry(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Module registry table name.

A call to Elixir.Skogsra.yggdrasil_module_registry() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_module_registry(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_module_registry)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_module_registry)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_module_registry)(namespace, :reload)

Link to this function yggdrasil_module_registry!(namespace \\ nil) View Source
yggdrasil_module_registry!(namespace :: atom()) ::
  {:ok, term()} | {:error, term()}

Module registry table name.

Same as Elixir.Skogsra.yggdrasil_module_registry/0 but fails on error.

It can receive also a namespace when needed.

Link to this function yggdrasil_process_registry(namespace \\ nil, type \\ :run) View Source
yggdrasil_process_registry(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Process registry.

A call to Elixir.Skogsra.yggdrasil_process_registry() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_process_registry(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_process_registry)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_process_registry)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_process_registry)(namespace, :reload)

Link to this function yggdrasil_process_registry!(namespace \\ nil) View Source
yggdrasil_process_registry!(namespace :: atom()) ::
  {:ok, term()} | {:error, term()}

Process registry.

Same as Elixir.Skogsra.yggdrasil_process_registry/0 but fails on error.

It can receive also a namespace when needed.

Link to this function yggdrasil_publisher_options(namespace \\ nil, type \\ :run) View Source
yggdrasil_publisher_options(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Yggdrasil publisher options. This options are for :poolboy. Defaults to [size: 5, max_overflow: 10].

A call to Elixir.Skogsra.yggdrasil_publisher_options() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_publisher_options(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_publisher_options)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_publisher_options)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_publisher_options)(namespace, :reload)

Link to this function yggdrasil_publisher_options!(namespace \\ nil) View Source
yggdrasil_publisher_options!(namespace :: atom()) ::
  {:ok, term()} | {:error, term()}

Yggdrasil publisher options. This options are for :poolboy. Defaults to [size: 5, max_overflow: 10].

Same as Elixir.Skogsra.yggdrasil_publisher_options/0 but fails on error.

It can receive also a namespace when needed.

Link to this function yggdrasil_pubsub_adapter(namespace \\ nil, type \\ :run) View Source
yggdrasil_pubsub_adapter(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Pub-sub adapter to use for channels. Default value is Phoenix.PubSub.PG2.

A call to Elixir.Skogsra.yggdrasil_pubsub_adapter() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_pubsub_adapter(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_adapter)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_adapter)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_pubsub_adapter)(namespace, :reload)

Link to this function yggdrasil_pubsub_adapter!(namespace \\ nil) View Source
yggdrasil_pubsub_adapter!(namespace :: atom()) ::
  {:ok, term()} | {:error, term()}

Pub-sub adapter to use for channels. Default value is Phoenix.PubSub.PG2.

Same as Elixir.Skogsra.yggdrasil_pubsub_adapter/0 but fails on error.

It can receive also a namespace when needed.

Link to this function yggdrasil_pubsub_name(namespace \\ nil, type \\ :run) View Source
yggdrasil_pubsub_name(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Pub-sub name. By default is Yggdrasil.PubSub.

A call to Elixir.Skogsra.yggdrasil_pubsub_name() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_pubsub_name(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_name)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_name)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_pubsub_name)(namespace, :reload)

Link to this function yggdrasil_pubsub_name!(namespace \\ nil) View Source
yggdrasil_pubsub_name!(namespace :: atom()) :: {:ok, term()} | {:error, term()}

Pub-sub name. By default is Yggdrasil.PubSub.

Same as Elixir.Skogsra.yggdrasil_pubsub_name/0 but fails on error.

It can receive also a namespace when needed.

Link to this function yggdrasil_pubsub_options(namespace \\ nil, type \\ :run) View Source
yggdrasil_pubsub_options(
  namespace :: atom(),
  type :: :run | :reload | :system | :config
) :: {:ok, term()} | {:error, term()}

Pub-sub options. By default are [pool_size: 1].

A call to Elixir.Skogsra.yggdrasil_pubsub_options() will:

  1. If the OS environment variable is not nil, will return its casted value.
  2. If the OS environment variable is nil, then it will try to get the value in the configuration file.
  3. If the configuration file does not contain the value, will return the default value if it’s defined.
  4. If the default value is not defined and is not required, it will return nil, otherwise it will error.

A call to Elixir.Skogsra.yggdrasil_pubsub_options(namespace) will try to do the same as before, but using a namespace (atom()). This is useful for separating the different configurations values for the same variable.

The expected OS variable name can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_options)(namespace, :system) where namespace can be either nil or any namespace.

The expected configuration file can be obtained running the function Elixir.Skogsra.yggdrasil_pubsub_options)(namespace, :config) where namespace can be either nil or any namespace.

For testing purposes, the value can be reloaded at runtime with the function Elixir.Skogsra.yggdrasil_pubsub_options)(namespace, :reload)

Link to this function yggdrasil_pubsub_options!(namespace \\ nil) View Source
yggdrasil_pubsub_options!(namespace :: atom()) ::
  {:ok, term()} | {:error, term()}

Pub-sub options. By default are [pool_size: 1].

Same as Elixir.Skogsra.yggdrasil_pubsub_options/0 but fails on error.

It can receive also a namespace when needed.