Belt v0.5.1 Belt.Config View Source

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

Link to this section 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

Link to this section Functions

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.

Link to this function get(module, key) View Source
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.