Module config

Config file parser for scalaris.

Copyright © 2007-2014 Zuse Institute Berlin

Version: $Id$

Authors: Thorsten Schuett (schuett@zib.de).

Description

Config file parser for scalaris.

Function Index

cfg_exists/1
cfg_is_atom/1
cfg_is_bool/1
cfg_is_float/1
cfg_is_greater_than/2
cfg_is_greater_than_equal/2
cfg_is_in/2
cfg_is_in_range/3
cfg_is_integer/1
cfg_is_ip/1
cfg_is_ip/2
cfg_is_less_than/2
cfg_is_less_than_equal/2
cfg_is_list/1
cfg_is_list/3
cfg_is_module/1
cfg_is_mypid/1
cfg_is_port/1
cfg_is_string/1
cfg_is_tuple/2
cfg_is_tuple/4
cfg_test_and_error/3Tests the config parameter stored under atom Key with function Pred and prints an error message if not, also returns the result.
check_config/0Checks whether config parameters of all processes exist and are valid.
read/1Reads a config parameter.
write/2Writes a config parameter.

Function Details

read/1

read(Key :: atom()) -> any() | failed

Reads a config parameter. If it is not found, the application's environment is checked or failed is returned. The result will be cached in the config.

write/2

write(Key :: atom(), Value :: any()) -> ok

Writes a config parameter.

check_config/0

check_config() -> boolean()

Checks whether config parameters of all processes exist and are valid.

cfg_exists/1

cfg_exists(Key :: atom()) -> boolean()

cfg_test_and_error/3

cfg_test_and_error(Key :: atom(),
                   Pred :: fun((any()) -> boolean()),
                   Msg :: list()) ->
                      boolean()

Tests the config parameter stored under atom Key with function Pred and prints an error message if not, also returns the result.

cfg_is_atom/1

cfg_is_atom(Key :: atom()) -> boolean()

cfg_is_module/1

cfg_is_module(Key :: atom()) -> boolean()

cfg_is_bool/1

cfg_is_bool(Key :: atom()) -> boolean()

cfg_is_mypid/1

cfg_is_mypid(Key :: atom()) -> boolean()

cfg_is_ip/1

cfg_is_ip(Key :: atom()) -> boolean()

cfg_is_ip/2

cfg_is_ip(Key :: atom(), AllowUnknown :: boolean()) -> boolean()

cfg_is_port/1

cfg_is_port(Key :: atom()) -> boolean()

cfg_is_integer/1

cfg_is_integer(Key :: atom()) -> boolean()

cfg_is_float/1

cfg_is_float(Key :: atom()) -> boolean()

cfg_is_tuple/2

cfg_is_tuple(Key :: atom(), TupleSize :: pos_integer()) ->
                boolean()

cfg_is_tuple/4

cfg_is_tuple(Key :: atom(),
             TupleSize :: pos_integer(),
             Pred :: fun((any()) -> boolean()),
             PredDescr :: string()) ->
                boolean()

cfg_is_list/1

cfg_is_list(Key :: atom()) -> boolean()

cfg_is_list/3

cfg_is_list(Key :: atom(),
            Pred :: fun((any()) -> boolean()),
            PredDescr :: string()) ->
               boolean()

cfg_is_string/1

cfg_is_string(Key :: atom()) -> boolean()

cfg_is_in_range/3

cfg_is_in_range(Key :: atom(), Min :: number(), Max :: number()) ->
                   boolean()

cfg_is_greater_than/2

cfg_is_greater_than(Key :: atom(), Min :: number() | atom()) ->
                       boolean()

cfg_is_greater_than_equal/2

cfg_is_greater_than_equal(Key :: atom(), Min :: number() | atom()) ->
                             boolean()

cfg_is_less_than/2

cfg_is_less_than(Key :: atom(), Max :: number() | atom()) ->
                    boolean()

cfg_is_less_than_equal/2

cfg_is_less_than_equal(Key :: atom(), Max :: number() | atom()) ->
                          boolean()

cfg_is_in/2

cfg_is_in(Key :: atom(), ValidValues :: [any(), ...]) -> boolean()


Generated by EDoc, Sep 11 2020, 15:26:03.