confy v0.3.0 Confy.Provider protocol View Source
Protocol to load configuration from a signle source.
Configuration Providers implement this protocol, which consists of only one function: load/2
.
Link to this section Summary
Functions
Loads the configuration of specification module
from the source indicated by struct
.
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: term()
t() :: term()
Link to this section Functions
Link to this function
load(struct, module) View Source
Loads the configuration of specification module
from the source indicated by struct
.
Its first argument is the implementation's own struct, the second argument being the configuration specification's module name.
If extra information is required about the configuration specification to write a good implementation, the Reflection function module_name.__confy__
can be used to look these up.
See also Confy.defconfig/2
and Confy.Options
.