Documentation ¶ Index ¶ type Job type RepeatPolicy type Scheduler func New() *Scheduler func (scheduler *Scheduler) AddAfter(duration time.Duration, fn func()) string func (scheduler *Scheduler) AddAt(tm time.Time, fn func()) string func (scheduler *Scheduler) Cancel(id string) bool func (scheduler *Scheduler) Len() int func (scheduler *Scheduler) Run(ctx context.Context) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Job ¶ type Job struct { // contains filtered or unexported fields } type RepeatPolicy ¶ type RepeatPolicy interface { Next(after time.Time) time.Time } type Scheduler ¶ type Scheduler struct { // contains filtered or unexported fields } func New ¶ func New() *Scheduler func (*Scheduler) AddAfter ¶ func (scheduler *Scheduler) AddAfter(duration time.Duration, fn func()) string func (*Scheduler) AddAt ¶ func (scheduler *Scheduler) AddAt(tm time.Time, fn func()) string func (*Scheduler) Cancel ¶ func (scheduler *Scheduler) Cancel(id string) bool func (*Scheduler) Len ¶ added in v0.0.3 func (scheduler *Scheduler) Len() int func (*Scheduler) Run ¶ func (scheduler *Scheduler) Run(ctx context.Context) Source Files ¶ View all Source files heap.goscheduler.go Click to show internal directories. Click to hide internal directories.