Aphora v1.0.0 Aphora.Config View Source

Aphora.Config provides a simple interface to the config.exs file, by providing a default variable fallback.

Link to this section Summary

Functions

Returns the set unique Aphora.datacenter/0 identifier from the config, or otherwise the default value 0.

Returns the set unique Aphora.epoch/0 identifier from the config, or otherwise the default value 1_546_300_800_000.

Returns the set unique Aphora.worker/0 identifier from the config, or otherwise the default value 0.

Link to this section Functions

Link to this function

get_datacenter() View Source (since 0.1.0)
get_datacenter() :: Aphora.datacenter()

Returns the set unique Aphora.datacenter/0 identifier from the config, or otherwise the default value 0.

Examples

iex> Aphora.Config.get_datacenter()
0
Link to this function

get_epoch() View Source (since 0.1.0)
get_epoch() :: Aphora.epoch()

Returns the set unique Aphora.epoch/0 identifier from the config, or otherwise the default value 1_546_300_800_000.

Examples

iex> Aphora.Config.get_epoch()
1_546_300_800_000
Link to this function

get_worker() View Source (since 0.1.0)
get_worker() :: Aphora.worker()

Returns the set unique Aphora.worker/0 identifier from the config, or otherwise the default value 0.

Examples

iex> Aphora.Config.get_worker()
0