Versions in this module Expand all Collapse all v0 v0.1.1 Nov 22, 2024 Changes in this version + func RegisterCron(cronName string, cron Interface) + func Run(ctx context.Context) + type Base struct + Ctx context.Context + func (b *Base) AddBaseTaskList(task func()) + func (b *Base) AddProcessAddTaskList(task func()) + func (b *Base) Before(name, lockName string, deadLockExpireTime time.Duration, maxConcurrencyCnt int) + func (b *Base) Defer() + func (b *Base) GetIsRun() bool + func (b *Base) Init(_ Interface) + func (b *Base) Process() + func (b *Base) Run() + type Config struct + CronList []ConfigItem + IsRunCron bool + LockPreName string + type ConfigItem struct + CronJobParams CronJobParams + DeadLockExpireMillisecond int64 + DurationJobParams DurationJobParams + DurationRandomJobParams DurationRandomJobParams + JobType string + MaxConcurrencyCnt int + Name string + type CronJobParams struct + Crontab string + WithSeconds bool + type DurationJobParams struct + EveryMillisecond int64 + type DurationRandomJobParams struct + MaxMillisecond int64 + MinMillisecond int64 + type Interface interface + AddBaseTaskList func(task func()) + AddProcessAddTaskList func(task func()) + Before func(name, lockName string, deadLockExpireTime time.Duration, maxConcurrencyCnt int) + Defer func() + GetIsRun func() bool + Init func(base Interface) + Process func() + Run func()