Yggdrasil v5.0.2 Yggdrasil.Settings View Source

This module defines the available settings for Yggdrasil.

Link to this section Summary

Functions

Yggdrasil publisher options. These options are for :poolboy.

Yggdrasil publisher options. These options are for :poolboy.

Pub-sub adapter to use for channels.

Pub-sub adapter to use for channels.

Puts the value to Yggdrasil.Settings.module_registry/0. Optionally, receives the namespace.

Puts the value to Yggdrasil.Settings.publisher_options/0. Optionally, receives the namespace.

Puts the value to Yggdrasil.Settings.pubsub_adapter/0. Optionally, receives the namespace.

Puts the value to Yggdrasil.Settings.pubsub_name/0. Optionally, receives the namespace.

Puts the value to Yggdrasil.Settings.pubsub_options/0. Optionally, receives the namespace.

Reloads the value for Yggdrasil.Settings.module_registry/0. Optionally, receives the namespace for the variable.

Reloads the value for Yggdrasil.Settings.publisher_options/0. Optionally, receives the namespace for the variable.

Reloads the value for Yggdrasil.Settings.pubsub_adapter/0. Optionally, receives the namespace for the variable.

Reloads the value for Yggdrasil.Settings.pubsub_name/0. Optionally, receives the namespace for the variable.

Reloads the value for Yggdrasil.Settings.pubsub_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

Link to this section Functions

Link to this function

module_registry(namespace \\ nil)

View Source
module_registry(Skogsra.Env.namespace()) :: {:ok, atom()} | {:error, binary()}

Module registry.

iex> Yggdrasil.Settings.module_registry!()
:"$yggdrasil_registry"

Calling Yggdrasil.Settings.module_registry() will ensure the following:

  • Binding order: [:config]
  • OS environment variable: ""
  • Type: :atom
  • Default: :"$yggdrasil_registry"
  • Required: false
  • Cached: true
Link to this function

module_registry!(namespace \\ nil)

View Source
module_registry!(Skogsra.Env.namespace()) :: atom() | no_return()

Module registry.

iex> Yggdrasil.Settings.module_registry!()
:"$yggdrasil_registry"

Bang version of Yggdrasil.Settings.module_registry/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

publisher_options(namespace \\ nil)

View Source
publisher_options(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}

Yggdrasil publisher options. These options are for :poolboy.

iex> Yggdrasil.Settings.publisher_options!()
[size: 1, max_overflow: 5]

Calling Yggdrasil.Settings.publisher_options() will ensure the following:

  • Binding order: [:config]
  • OS environment variable: ""
  • Type: :any
  • Default: [size: 1, max_overflow: 5]
  • Required: false
  • Cached: true
Link to this function

publisher_options!(namespace \\ nil)

View Source
publisher_options!(Skogsra.Env.namespace()) :: any() | no_return()

Yggdrasil publisher options. These options are for :poolboy.

iex> Yggdrasil.Settings.publisher_options!()
[size: 1, max_overflow: 5]

Bang version of Yggdrasil.Settings.publisher_options/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

pubsub_adapter(namespace \\ nil)

View Source
pubsub_adapter(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}

Pub-sub adapter to use for channels.

iex> Yggdrasil.Settings.pubsub_adapter!()
Phoenix.PubSub.PG2

Calling Yggdrasil.Settings.pubsub_adapter() will ensure the following:

  • Binding order: [:config]
  • OS environment variable: ""
  • Type: :atom
  • Default: Phoenix.PubSub.PG2
  • Required: false
  • Cached: true
Link to this function

pubsub_adapter!(namespace \\ nil)

View Source
pubsub_adapter!(Skogsra.Env.namespace()) :: any() | no_return()

Pub-sub adapter to use for channels.

iex> Yggdrasil.Settings.pubsub_adapter!()
Phoenix.PubSub.PG2

Bang version of Yggdrasil.Settings.pubsub_adapter/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

pubsub_name(namespace \\ nil)

View Source
pubsub_name(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}

Pub-sub name.

iex> Yggdrasil.Settings.pubsub_name!()
Yggdrasil.PubSub

Calling Yggdrasil.Settings.pubsub_name() will ensure the following:

  • Binding order: [:config]
  • OS environment variable: ""
  • Type: :atom
  • Default: Yggdrasil.PubSub
  • Required: false
  • Cached: true
Link to this function

pubsub_name!(namespace \\ nil)

View Source
pubsub_name!(Skogsra.Env.namespace()) :: any() | no_return()

Pub-sub name.

iex> Yggdrasil.Settings.pubsub_name!()
Yggdrasil.PubSub

Bang version of Yggdrasil.Settings.pubsub_name/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

pubsub_options(namespace \\ nil)

View Source
pubsub_options(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}

Pub-sub options.

iex> Yggdrasil.Settings.pubsub_options!()
[pool_size: 1]

Calling Yggdrasil.Settings.pubsub_options() will ensure the following:

  • Binding order: [:config]
  • OS environment variable: ""
  • Type: :any
  • Default: [pool_size: 1]
  • Required: false
  • Cached: true
Link to this function

pubsub_options!(namespace \\ nil)

View Source
pubsub_options!(Skogsra.Env.namespace()) :: any() | no_return()

Pub-sub options.

iex> Yggdrasil.Settings.pubsub_options!()
[pool_size: 1]

Bang version of Yggdrasil.Settings.pubsub_options/0 (fails on error). Optionally, receives the namespace for the variable.

Link to this function

put_module_registry(value, namespace \\ nil)

View Source
put_module_registry(atom(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}

Puts the value to Yggdrasil.Settings.module_registry/0. Optionally, receives the namespace.

Link to this function

put_publisher_options(value, namespace \\ nil)

View Source
put_publisher_options(any(), Skogsra.Env.namespace()) ::
  :ok | {:error, binary()}

Puts the value to Yggdrasil.Settings.publisher_options/0. Optionally, receives the namespace.

Link to this function

put_pubsub_adapter(value, namespace \\ nil)

View Source
put_pubsub_adapter(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}

Puts the value to Yggdrasil.Settings.pubsub_adapter/0. Optionally, receives the namespace.

Link to this function

put_pubsub_name(value, namespace \\ nil)

View Source
put_pubsub_name(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}

Puts the value to Yggdrasil.Settings.pubsub_name/0. Optionally, receives the namespace.

Link to this function

put_pubsub_options(value, namespace \\ nil)

View Source
put_pubsub_options(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}

Puts the value to Yggdrasil.Settings.pubsub_options/0. Optionally, receives the namespace.

Link to this function

reload_module_registry(namespace \\ nil)

View Source
reload_module_registry(Skogsra.Env.namespace()) ::
  {:ok, atom()} | {:error, binary()}

Reloads the value for Yggdrasil.Settings.module_registry/0. Optionally, receives the namespace for the variable.

Link to this function

reload_publisher_options(namespace \\ nil)

View Source
reload_publisher_options(Skogsra.Env.namespace()) ::
  {:ok, any()} | {:error, binary()}

Reloads the value for Yggdrasil.Settings.publisher_options/0. Optionally, receives the namespace for the variable.

Link to this function

reload_pubsub_adapter(namespace \\ nil)

View Source
reload_pubsub_adapter(Skogsra.Env.namespace()) ::
  {:ok, any()} | {:error, binary()}

Reloads the value for Yggdrasil.Settings.pubsub_adapter/0. Optionally, receives the namespace for the variable.

Link to this function

reload_pubsub_name(namespace \\ nil)

View Source
reload_pubsub_name(Skogsra.Env.namespace()) :: {:ok, any()} | {:error, binary()}

Reloads the value for Yggdrasil.Settings.pubsub_name/0. Optionally, receives the namespace for the variable.

Link to this function

reload_pubsub_options(namespace \\ nil)

View Source
reload_pubsub_options(Skogsra.Env.namespace()) ::
  {:ok, any()} | {:error, binary()}

Reloads the value for Yggdrasil.Settings.pubsub_options/0. Optionally, receives the namespace for the variable.

Link to this function

template(filename, options \\ [])

View Source
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.