Versions in this module Expand all Collapse all v0 v0.1.2 Mar 26, 2022 v0.1.1 Mar 26, 2022 Changes in this version + const ExpressEvery10Min + const ExpressEvery30Min + const ExpressEvery5Min + const ExpressEveryDay + const ExpressEveryHour + const ExpressEveryMin + const ExpressEveryMonth + type Config struct + Async bool + SingletonModeAll bool + TimeZone string + type Job struct + func NewJob(name string, exec func(), express string) *Job + type Locker interface + Lock func(key string, ttl time.Duration) error + UnLock func(key string) error + type MockLocker struct + func NewMockLocker(ctrl *gomock.Controller) *MockLocker + func (m *MockLocker) EXPECT() *MockLockerMockRecorder + func (m *MockLocker) Lock(key string, ttl time.Duration) error + func (m *MockLocker) UnLock(key string) error + type MockLockerMockRecorder struct + func (mr *MockLockerMockRecorder) Lock(key, ttl interface{}) *gomock.Call + func (mr *MockLockerMockRecorder) UnLock(key interface{}) *gomock.Call + type RedisLocker struct + func NewRedisLocker(redisURL string) (*RedisLocker, error) + func (r *RedisLocker) Lock(key string, ttl time.Duration) error + func (r *RedisLocker) UnLock(key string) error + type Scheduler struct + func NewScheduler(cfg *Config, locker Locker) *Scheduler + func (s *Scheduler) AddJobs(jobs ...*Job) error + func (s *Scheduler) Start()