Module yxa_config

YXA configuration subsystem.

Introduced in: 15 Jun 2005 by Fredrik Thulin <ft@it.su.se>

Behaviours: gen_server.

Authors: Fredrik Thulin (ft@it.su.se).

Description

YXA configuration subsystem.

Data Types

state()

state() = #state{}

no description

Function Index

get_env/1 Fetch parameter value.
get_env/2 Fetch parameter value, with a default specified by the caller.
list/0 Return a list of tuples with the current configuration.
reload/0 Parse, validate and load the configuration (again).
start_link/1 start the server.

Function Details

get_env/1

get_env(Key) -> {ok, Value} | Value | none

Fetch parameter value. Return 'none' if parameter is known but not set. throw() if unknown parameter is requested.

get_env/2

get_env(Key, Default) -> {ok, Value} | Value | none

Fetch parameter value, with a default specified by the caller. throw() if unknown parameter is requested.

list/0

list() -> [ConfigTuple]

Return a list of tuples with the current configuration.

reload/0

reload() -> ok | {error, Where, Msg}

Parse, validate and load the configuration (again).

start_link/1

start_link(AppModule) -> {ok, Pid}

start the server.


Generated by EDoc, Oct 17 2007, 16:48:04.