View Source conf behaviour (conf v0.2.6)

Link to this section Summary

Link to this section Types

-type apps_config() :: [{atom(), #{atom() => term()} | {atom(), term()}}].
-type backend() :: conf_yaml_backend.
-type error_reason() ::
    {bad_env, conf_env:error_reason()} |
    {bad_ref, conf_file:ref(), conf_file:error_reason()} |
    {backend(), term()}.

Link to this section Callbacks

-callback validator() -> yval:validator().

Link to this section Functions

Link to this function

config_change(Changed, New, Removed)

View Source
-spec config_change(Changed :: [{atom(), term()}], New :: [{atom(), term()}], Removed :: [atom()]) -> ok.
-spec format_error(error_reason()) -> string().
-spec get_path() -> {ok, binary()} | {error, error_reason()}.
-spec load(term()) -> ok | {error, error_reason()}.
-spec load_file(file:filename_all()) -> ok | {error, error_reason()}.
-spec reload(term()) -> ok | {error, error_reason()}.
-spec reload_file() -> ok | {error, error_reason()}.
-spec reload_file(file:filename_all()) -> ok | {error, error_reason()}.
-spec start() -> ok | {error, term()}.
Link to this function

start(StartType, StartArgs)

View Source
-spec start(normal | {takeover, node()} | {failover, node()}, term()) -> {ok, pid()} | {error, term()}.
-spec stop() -> ok | {error, term()}.
-spec stop(term()) -> ok.