Module nconf

Module for reading the contents of an nconf config file and modifying the configuration parameters accordingly.

Copyright © (C) 2015, Erlang Solutions Ltd

Description

Module for reading the contents of an nconf config file and modifying the configuration parameters accordingly.

The following commands are available in an nconf config file:

      {set, AppName, ParamName, Path1, ..., PathN, Replacement}
      {replace, AppName, ParamName, Path1, ..., PathN, Replacement}
      {unset, AppName, ParamName, Path1, ..., PathN}

Data Types

config_tuples()

config_tuples() = [tuple()]

A list of tuples, representing the contents of an nconf config file.

Function Index

apply_config/1Modify the configuration parameters according to an nconf config file.
apply_config_tuples/1Modify the configuration parameters according to the configuration tuples.
read_config/1Read an nconf config file.

Function Details

apply_config/1

apply_config(FileName::file:name_all()) -> any()

Modify the configuration parameters according to an nconf config file.

apply_config_tuples/1

apply_config_tuples(Config::config_tuples()) -> ok | {error, ErrorList::[term()]}

Modify the configuration parameters according to the configuration tuples.

read_config/1

read_config(FileName::file:name_all()) -> {ok, config_tuples()} | {error, {Reason::term(), ReasonStr::string()}}

Read an nconf config file.


Generated by EDoc, Aug 16 2016, 18:06:10.