NervesHubLink.Alarms (nerves_hub_link v2.9.0)

View Source

A slim adapter for Alarmist and :alarm_handler, providing a unified interface for setting and clearing alarms.

This primarily exists because :alarm_handler.get_alarms() will fail if the default alarm_handler has been replaced. Until a path is decided for account for that, this keeps the implementations separate with minimal set/clear handling adjustment when the default handler is used in order to match Alarmist experience better.

Summary

Functions

clear_alarm(alarm)

@spec clear_alarm(term()) :: :ok

get_alarms()

@spec get_alarms() :: [Alarmist.alarm()]

set_alarm(alarm)

@spec set_alarm({term(), term()}) :: :ok