Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClock ¶
func WithClock(c clock.Clock) interface { RecurringTaskOption DelayTaskOption }
WithClock set a clock to a task.
Types ¶
type DelayTask ¶
type DelayTask struct {
// contains filtered or unexported fields
}
DelayTask represents a timeout task
func NewDelayTask ¶
func NewDelayTask(cb Task, d time.Duration, ops ...DelayTaskOption) *DelayTask
NewDelayTask creates an instance of DelayTask
type DelayTaskOption ¶
type DelayTaskOption interface {
SetDelayTaskOption(*DelayTask)
}
DelayTaskOption is option to DelayTask.
type RecurringTask ¶
RecurringTask represents a recurring task
func NewRecurringTask ¶
func NewRecurringTask(t Task, i time.Duration, ops ...RecurringTaskOption) *RecurringTask
NewRecurringTask creates an instance of RecurringTask
type RecurringTaskOption ¶
type RecurringTaskOption interface {
SetRecurringTaskOption(*RecurringTask)
}
RecurringTaskOption is option to RecurringTask.
Click to show internal directories.
Click to hide internal directories.