Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Condition ¶
Condition is a function that gets executed with a certain time.
- It should return the deadline for the notification, as well as a callback function to execute once the time to the deadline is less than one of the notify attempts. If deadline is the zero time, callback will not be executed.
- Callback is executed once for every time the difference between deadline and the current time is less than an element of countdown.
- To enforce a minimum interval between consecutive callbacks, truncate the returned deadline to the minimum interval.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier calls a Condition at most once for each count in countdown.
Click to show internal directories.
Click to hide internal directories.