Versions in this module Expand all Collapse all v1 v1.0.6 Mar 2, 2021 v1.0.5 Mar 2, 2021 Changes in this version + type AddCbArgs struct + Error error + type BanCbArgs struct + Error error + Key string + type CancelCbArgs struct + Error error + Key string + type EveryDaySchedule struct + func NewEveryDaySchedule(hour, minute, second, mSecond int) *EveryDaySchedule + func (e *EveryDaySchedule) Expression(t *TaskInfo) (nt time.Time, isValid bool) + func (e *EveryDaySchedule) ToString() string + type ExecuteCbArgs struct + Error error + Gid pool.GoroutineUID + Res map[string]interface{} + type ISchedule interface + Expression func(t *TaskInfo) (nt time.Time, isValid bool) + ToString func() string + type PlanSchedule struct + func NewPlanSchedule(tList []time.Time) *PlanSchedule + func (p *PlanSchedule) Expression(t *TaskInfo) (nt time.Time, isValid bool) + func (p *PlanSchedule) ToString() string + type SpecSchedule struct + func NewSpecSchedule(spec time.Duration) *SpecSchedule + func (p *SpecSchedule) Expression(t *TaskInfo) (nt time.Time, isValid bool) + func (p *SpecSchedule) Record(t *TaskInfo, cs ...int) (et []time.Time) + func (p *SpecSchedule) ToString() string + type SpecTimeSchedule struct + func NewSpecTimeSchedule(spec time.Duration, time int) *SpecTimeSchedule + func (p *SpecTimeSchedule) Expression(t *TaskInfo) (nt time.Time, isValid bool) + func (p *SpecTimeSchedule) ToString() string + type TaskInfo struct + AddTime time.Time + Count int + HasNext bool + Key string + LastResult *TaskResult + LastTime time.Time + NextTime time.Time + Sche ISchedule + Task TaskObj + func NewTaskInfo(key string, task TaskObj, sche ISchedule) *TaskInfo + func (t *TaskInfo) Clone() *TaskInfo + func (t *TaskInfo) GetAddTaskTime() time.Time + func (t *TaskInfo) GetLastExecuteTime() (time.Time, bool) + func (t *TaskInfo) HasNextExecute() bool + func (t *TaskInfo) NextScheduleTime() time.Time + func (t *TaskInfo) Update() + type TaskMap struct + func NewTaskMap() *TaskMap + func (tm *TaskMap) Add(key string, task *TaskInfo) + func (tm *TaskMap) AddOrSet(key string, task *TaskInfo) + func (tm *TaskMap) Delete(key string) + func (tm *TaskMap) Get(key string) *TaskInfo + func (tm *TaskMap) GetAll() map[string]*TaskInfo + func (tm *TaskMap) IsExist(key string) bool + func (tm *TaskMap) SelectNextExec() (*TaskInfo, time.Duration, bool) + func (tm *TaskMap) Set(key string, task *TaskInfo) + type TaskObj func() (map[string]interface{}, error) + type TaskResult struct + Err error + Result map[string]interface{} + func (tr *TaskResult) Clone() *TaskResult + type TimerObj func() (spec time.Duration, start, end time.Time) + func Timer() TimerObj + type UnBanCbArgs BanCbArgs