Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(ctx context.Context, f func(), periodicInterval time.Duration, defaultReqDelay time.Duration) chan time.Duration
Run runs a task at a given periodic interval, or as requested over a channel. If many requests come in close to the same time, only run the task once. Callers can ask for the task to be run within a given amount of time, which overrides defaultReqDelay. Sending a zero to the channel runs it immediately.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.