alarm_clock v0.1.1 AlarmClock.Persister behaviour

Link to this section Summary

Link to this section Types

Link to this type alarm()
alarm() :: {:alarm, call_type, pid, any, opts, integer}
Link to this type alarm_id()
alarm_id() :: String.t
Link to this type call_type()
call_type() :: :call | :cast
Link to this type opts()
opts() :: [{:key, atom}]

Link to this section Functions

Link to this function calculate_time(in_ms)
Link to this function get_runnable_alarm(arg)
Link to this function miliseconds_until(date_time)

Link to this section Callbacks

Link to this callback delete_alarm(alarm_id)
delete_alarm(alarm_id :: alarm_id) :: :ok | {:error, :not_found}
Link to this callback load_saved_alarms()
load_saved_alarms() :: [{alarm_id, alarm}]
Link to this callback save_alarm(alarm)
save_alarm(alarm :: alarm) :: {:ok, alarm_id}