View Source amoc_config_utils (amoc v3.0.0-rc1)

Link to this section Summary

Link to this section Types

-type error() :: {error, error_type(), reason()}.
-type error_type() :: atom().
-type maybe_module_config() :: {ok, [module_parameter()]} | error().
-type maybe_update_fun() :: update_fun() | fun((_, _) -> any()).
Link to this type

maybe_verification_fun/0

View Source
-type maybe_verification_fun() :: verification_fun() | fun((_) -> any()).
Link to this type

module_configuration/0

View Source
-type module_configuration() :: [module_parameter()].
-type module_parameter() :: #module_parameter{}.
-type name() :: atom().
-type reason() :: any().
-type update_fun() :: fun((ParamName :: name(), NewValue :: value()) -> any()).
-type value() :: any().
-type verification_fun() ::
    fun((Value :: value()) -> boolean() | {true, NewValue :: value()} | {false, reason()}).

Link to this section Functions

Link to this function

create_amoc_config_ets()

View Source
-spec create_amoc_config_ets() -> any().
-spec find_all_vars(atom()) -> [any()].
Link to this function

maybe_error(ErrorType, List)

View Source
-spec maybe_error(error_type(), [{error, reason()} | {ok, any()}]) -> error() | {ok, [any()]}.
Link to this function

merge_config(MergedConfig, L)

View Source
Link to this function

override_config(OldConfig, NewConfig)

View Source
-spec override_config(module_configuration(), module_configuration()) -> {ok, module_configuration()}.
Link to this function

pipeline(Actions, InitValue)

View Source
-spec pipeline([{function(), Args :: [any()]}], any()) -> any().
Link to this function

store_scenario_config(Config)

View Source
-spec store_scenario_config(module_configuration()) -> ok.