Versions in this module Expand all Collapse all v1 v1.1.0 Oct 24, 2023 Changes in this version + var ErrTimerOverdue = fmt.Errorf("timer overdue") + type DBTimer struct + func NewDBTimer(service string, db *gorm.DB, opts ...Option) *DBTimer + func (t *DBTimer) Cancel(key string) error + func (t *DBTimer) RegisterTimerHandler(cb ddd.TimerHandler) + func (t *DBTimer) RunCron(key, cronExp string, data []byte) error + func (t *DBTimer) RunOnce(key string, runTime time.Time, data []byte) error + func (t *DBTimer) Start(ctx context.Context) + type Option func(opt *Options) + type Options struct + Logger logr.Logger + RunInterval time.Duration + type TimerJob struct + CreatedAt time.Time + Cron string + ID int64 + Key string + Msg string + NextTime time.Time + Payload []byte + Service string + Status TimerStatus + func (t *TimerJob) Close(err error) + func (t *TimerJob) Next() error + func (t *TimerJob) Reset() error + func (t *TimerJob) TableName() string + type TimerStatus int + const TimerFailed + const TimerFinished + const TimerToRun