Versions in this module Expand all Collapse all v1 v1.0.1 Jul 7, 2021 v1.0.0 Sep 5, 2020 Changes in this version + func Run(task Task) error + func RunForTesting(task Task, clock Clock) (err error) + func SetTime(newTime time.Time) + type Clock interface + After func(d time.Duration) <-chan time.Time + Now func() time.Time + func SystemClock() Clock + type ClockForTesting struct + Current time.Time + func (c *ClockForTesting) After(d time.Duration) <-chan time.Time + func (c *ClockForTesting) Now() time.Time + type Execution struct + func Start(task Task) *Execution + func (e *Execution) Done() <-chan struct{} + func (e *Execution) End() + func (e *Execution) Ended() <-chan struct{} + func (e *Execution) Error() error + func (e *Execution) IsDone() bool + func (e *Execution) IsEnded() bool + func (e *Execution) SetError(err error) + func (e *Execution) Sleep(d time.Duration) bool + func (e *Execution) Yield(sleepFunc func()) bool + type FakeClock struct + func NewFakeClock(currentTime time.Time) *FakeClock + func (f *FakeClock) Advance(d time.Duration) + func (f *FakeClock) After(d time.Duration) <-chan time.Time + func (f *FakeClock) Now() time.Time + type MultiExecutor struct + func NewMultiExecutor(tc TaskCollection) *MultiExecutor + func NewMultiExecutorWithClock(tc TaskCollection, clock Clock) *MultiExecutor + func (me *MultiExecutor) Close() error + func (me *MultiExecutor) Pause() + func (me *MultiExecutor) Resume() + func (me *MultiExecutor) Start(t Task) *Execution + func (me *MultiExecutor) Tasks() TaskCollection + type SingleExecutor MultiExecutor + func NewSingleExecutor() *SingleExecutor + func (se *SingleExecutor) Close() error + func (se *SingleExecutor) Current() (Task, *Execution) + func (se *SingleExecutor) Pause() + func (se *SingleExecutor) Resume() + func (se *SingleExecutor) Start(t Task) *Execution + type Task interface + Do func(execution *Execution) + func NilTask() Task + func ParallelTasks(tasks ...Task) Task + func RecurringTask(t Task, r recurring.R) Task + func RepeatingTask(t Task, n int) Task + func SeriesTasks(tasks ...Task) Task + type TaskCollection interface + Add func(t Task, e *Execution) + Conflicts func(t Task) []*Execution + Remove func(t Task) + type TaskFunc func(execution *Execution) + func (f TaskFunc) Do(execution *Execution)