Versions in this module Expand all Collapse all v0 v0.1.0 Nov 27, 2022 Changes in this version + func Del(id string) + func Exist(ids []string) (notExist []string) + func NewFixedTask(f *Fixed) scheduler.Task + func SetDB(d DB) + type AddState byte + const ConflictErr + const DataErr + const InternalError + const OK + func Add(ctx context.Context, id string, cronTimeStr string, ...) AddState + type CronTime struct + LocationStr string + RawString string + StartTime scheduler.UnixTimeSecond + func NewCronTimeFromBytes(j []byte) *CronTime + func NewCronTimeFromSpec(s *cron.SpecSchedule, start scheduler.UnixTimeSecond, rawString string) *CronTime + func (c *CronTime) ToBytes() []byte + type DB interface + Add func(id string, cronTime []byte, opFlag string) AddState + Del func(id string) + Exist func(ids []string) (notExist []string) + Get func(id string) (cronTime []byte, opFlag string, ok bool) + Visit func(startId string) (items []struct{ ... }, nextId string) + type Fixed struct + Id string + OpFlag string + TimePoint scheduler.UnixTimeSecond + TryCount uint16 + func FromBytes(b []byte) *Fixed + func (f *Fixed) Run(ctx context.Context, schedulerTime scheduler.UnixTimeSecond) + func (f *Fixed) ToBytes() []byte + type VisitItem struct + CronTimeStr string + Id string + Start scheduler.UnixTimeSecond + func Visit(startId string) (items []VisitItem, nextId string)