Documentation
¶
Overview ¶
Package scheduler implements a simple scheduler that triggers the next item when its due time is reached based on the list of upcoming items.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TriggerNames ¶
TriggerNames returns a human-readable description of the items that are about to be triggered.
Types ¶
type GetItemsFunc ¶
GetItemsFunc is a callback that returns items for the scheduler to consider.
type Item ¶
Item describes an item that can be scheduled with a function that is invoked the next time the item is due.
type Scheduler ¶
type Scheduler struct { TimeNow func() time.Time Debug bool // contains filtered or unexported fields }
Scheduler manages triggering of arbitrary events by periodically determining the first of a set of upcoming events and waiting until it's due and invoking the trigger function.
Click to show internal directories.
Click to hide internal directories.