antikythera v0.2.0 AntikytheraCore.Alert.Manager View Source
An event manager hosting multiple AntikytheraCore.Alert.Handler
s.
Managers are spawned per OTP application (antikythera and each gear). Each handler has its own buffer to store messages before sending them as an alert.
Link to this section Summary
Functions
Notify a manager
process of a message body
with optional time
Schedule next flushing from handlers. Assuming the interval
is in seconds.
Note that handlers are kept as state in gen_event manager process,
thus calling self/0
always refers to the manager process which the handler is installed in
Update handler installations according to alert config of an OTP application (antikythera or gear). Handlers will be installed/uninstalled depending on contents of the config. If the config has sufficient information for a handler, it will be installed (noop if already installed). Otherwise, it will not be installed and will be uninstalled if it is already installed
Link to this section Functions
notify(atom(), String.t(), Antikythera.Time.t()) :: :ok
Notify a manager
process of a message body
with optional time
.
schedule_handler_timeout(module(), pos_integer()) :: :ok
Schedule next flushing from handlers. Assuming the interval
is in seconds.
Note that handlers are kept as state in gen_event manager process,
thus calling self/0
always refers to the manager process which the handler is installed in.
update_handler_installations(:antikythera | Antikythera.GearName.t(), AntikytheraCore.Alert.HandlerConfigsMap.t()) :: :ok
Update handler installations according to alert config of an OTP application (antikythera or gear). Handlers will be installed/uninstalled depending on contents of the config. If the config has sufficient information for a handler, it will be installed (noop if already installed). Otherwise, it will not be installed and will be uninstalled if it is already installed.
Any errors will be logged but this function always returns :ok
.