Documentation ¶
Index ¶
- func LocalHostName() string
- func NewScLockRedis(rdb *redis.Client)
- type Locker
- type LockerDb
- func (l LockerDb) AddFun(name string, spec string, cmd func()) error
- func (l LockerDb) AddJob(name string, spec string, job cron.Job) error
- func (l LockerDb) AddSchedules(schedules []*Schedule) error
- func (l LockerDb) DoLock(name string) bool
- func (l LockerDb) Find(name string) *Schedule
- func (l LockerDb) Insert(name string) bool
- func (l LockerDb) Start()
- func (l LockerDb) Stop()
- func (l LockerDb) Unlock(name string) bool
- func (l LockerDb) Update(name string) bool
- type QuartzJob
- type Schedule
- type ShedLock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalHostName ¶
func LocalHostName() string
func NewScLockRedis ¶
Types ¶
type Locker ¶
type Locker interface { AddFun(name string, spec string, cmd func()) error AddJob(name string, spec string, job cron.Job) error AddSchedules(schedules []*Schedule) error DoLock(name string) bool Insert(name string) bool Find(name string) *Schedule Update(name string) bool Unlock(name string) bool Start() Stop() }
type LockerDb ¶
type LockerDb struct { LockTime int `json:"lock_time" 20 sec` // contains filtered or unexported fields }
LockerDb
func NewLockerDb ¶
func (LockerDb) AddSchedules ¶
Click to show internal directories.
Click to hide internal directories.