eturnal (eturnal v1.12.2+1)

View Source

Summary

Types

config_changes/0

-type config_changes() :: {[{option(), value()}], [{option(), value()}], [option()]}.

listeners/0

-type listeners() :: [{inet:ip_address(), inet:port_number(), transport()}].

modules/0

-type modules() :: [module()].

option/0

-type option() :: atom().

state/0

-opaque state()

transport/0

-type transport() :: udp | tcp | tls | auto.

value/0

-type value() :: term().

Functions

abort(Reason)

-spec abort(term()) -> no_return().

code_change(OldVsn, State, Extra)

-spec code_change({down, term()} | term(), state(), term()) -> {ok, state()}.

config_is_loaded()

-spec config_is_loaded() -> boolean().

create_self_signed(File)

-spec create_self_signed(file:filename_all()) -> ok.

get_opt(Opt)

-spec get_opt(option()) -> value().

get_password(Username, Realm)

-spec get_password(binary(), binary()) -> binary() | [binary()] | {expired, binary() | [binary()]}.

handle_call(Request, From, State)

-spec handle_call(reload | get_status | get_info | get_version | get_loglevel |
                  {set_loglevel, eturnal_logger:level()} |
                  {get_password, binary()} |
                  term(),
                  {pid(), term()},
                  state()) ->
                     {reply, ok | {ok, term()} | {error, term()}, state()}.

handle_cast(Msg, State)

-spec handle_cast(reload | {config_change, config_changes(), fun(() -> ok), fun(() -> ok)} | term(),
                  state()) ->
                     {noreply, state()}.

handle_info(Info, State)

-spec handle_info(term(), state()) -> {noreply, state()}.

init(Opts)

-spec init(any()) -> {ok, state()}.

init_config()

-spec init_config() -> ok.

reload(ConfigChanges, BeginFun, EndFun)

-spec reload(config_changes(), fun(() -> ok), fun(() -> ok)) -> ok.

run_hook(Event, Info)

-spec run_hook(eturnal_module:event(), eturnal_module:info()) -> ok.

start()

-spec start() -> ok | {error, term()}.

start_link()

-spec start_link() -> {ok, pid()} | ignore | {error, term()}.

stop()

-spec stop() -> ok | {error, term()}.

terminate(Reason, State)

-spec terminate(normal | shutdown | {shutdown, term()} | term(), state()) -> ok.