Belt v0.1.6 Belt.Config

Module for retrieving configuration and defaults.

Usage

# in config.exs
config :belt,
  max_concurrency: 10,
  max_renames: 10

config :belt, Belt.Provider.S3,
  max_concurrency: 5
# in the application
Belt.Config.get(Belt.Provider.S3, :max_concurrency)
#=> 5
Belt.Config.get(Belt.Provider.S3, :max_renames)
#=> 10

Summary

Functions

Returns configuration value for key. If no value has been set in the configuration of the application, a default value is used instead

Returns configuration value for key specific to module. If no value has been set in the configuration of the application, module, the application-wide default value is used instead

Functions

get(key)
get(atom) :: term

Returns configuration value for key. If no value has been set in the configuration of the application, a default value is used instead.

Raises an exception if no default value could be found.

get(module, key)
get(atom, atom) :: term

Returns configuration value for key specific to module. If no value has been set in the configuration of the application, module, the application-wide default value is used instead.

Raises an exception if no default value could be found.