Yggdrasil v5.0.2 Yggdrasil.Settings View Source
This module defines the available settings for Yggdrasil.
Link to this section Summary
Functions
Module registry.
Module registry.
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.
Pub-sub name.
Pub-sub name.
Pub-sub options.
Pub-sub options.
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
module_registry(namespace \\ nil)
View Sourcemodule_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
module_registry!(namespace \\ nil)
View Sourcemodule_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.
publisher_options(namespace \\ nil)
View Sourcepublisher_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
publisher_options!(namespace \\ nil)
View Sourcepublisher_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.
pubsub_adapter(namespace \\ nil)
View Sourcepubsub_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
pubsub_adapter!(namespace \\ nil)
View Sourcepubsub_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.
pubsub_name(namespace \\ nil)
View Sourcepubsub_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
pubsub_name!(namespace \\ nil)
View Sourcepubsub_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.
pubsub_options(namespace \\ nil)
View Sourcepubsub_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
pubsub_options!(namespace \\ nil)
View Sourcepubsub_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.
put_module_registry(value, namespace \\ nil)
View Sourceput_module_registry(atom(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value
to Yggdrasil.Settings.module_registry/0
. Optionally, receives
the namespace
.
put_publisher_options(value, namespace \\ nil)
View Sourceput_publisher_options(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value
to Yggdrasil.Settings.publisher_options/0
. Optionally, receives
the namespace
.
put_pubsub_adapter(value, namespace \\ nil)
View Sourceput_pubsub_adapter(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value
to Yggdrasil.Settings.pubsub_adapter/0
. Optionally, receives
the namespace
.
put_pubsub_name(value, namespace \\ nil)
View Sourceput_pubsub_name(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value
to Yggdrasil.Settings.pubsub_name/0
. Optionally, receives
the namespace
.
put_pubsub_options(value, namespace \\ nil)
View Sourceput_pubsub_options(any(), Skogsra.Env.namespace()) :: :ok | {:error, binary()}
Puts the value
to Yggdrasil.Settings.pubsub_options/0
. Optionally, receives
the namespace
.
reload_module_registry(namespace \\ nil)
View Sourcereload_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.
reload_publisher_options(namespace \\ nil)
View Sourcereload_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.
reload_pubsub_adapter(namespace \\ nil)
View Sourcereload_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.
reload_pubsub_name(namespace \\ nil)
View Sourcereload_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.
reload_pubsub_options(namespace \\ nil)
View Sourcereload_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.
template(filename, options \\ [])
View Sourcetemplate(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.