Documentation
¶
Index ¶
- func InitTimeoutSchedule()
- func InitTimeoutScheduleV2()
- type CacelJobID
- type JOB
- type Job
- type JobContext
- type JobContextV2
- type JobID
- type JobStatue
- type JobV2
- type TIMESCHED
- type TimeoutSchedule
- func (ts *TimeoutSchedule) AddCheckJob(d time.Duration, cb func(jc JobContext) bool) int64
- func (ts *TimeoutSchedule) AddCheckJobWithData(t time.Time, cb func(jc JobContext) bool, desc string, ...) int64
- func (ts *TimeoutSchedule) AddCheckJobWithTime(t time.Time, cb func(jc JobContext) bool) int64
- func (ts *TimeoutSchedule) AddCheckJobWithTimeV2(t time.Time, cb func(jc JobContext) bool, desc string) int64
- func (ts *TimeoutSchedule) RemoveCheckJob(jid int64)
- func (ts *TimeoutSchedule) Start()
- type TimeoutScheduleV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTimeoutSchedule ¶
func InitTimeoutSchedule()
func InitTimeoutScheduleV2 ¶
func InitTimeoutScheduleV2()
Types ¶
type CacelJobID ¶
type CacelJobID struct {
// contains filtered or unexported fields
}
type Job ¶
type Job struct {
JobID
OutID int64
Status JobStatue
Description string
// contains filtered or unexported fields
}
func (*Job) GetJobDescription ¶
func (*Job) GetNextTime ¶
func (*Job) GetRunCount ¶
func (*Job) SetNextRunTime ¶
type JobContext ¶
type JobContextV2 ¶
type JobV2 ¶
type JobV2 struct {
JobContextV2
InnerID JobID
// contains filtered or unexported fields
}
type TimeoutSchedule ¶
type TimeoutSchedule struct {
*skiplist.SkipList
*snowflake.Node
UpdataCb func(*Job) // 注意这个回调函数长时间阻塞可能会导致整个job调度停滞
// contains filtered or unexported fields
}
var TimeoutScheduleIns *TimeoutSchedule
func (*TimeoutSchedule) AddCheckJob ¶
func (ts *TimeoutSchedule) AddCheckJob(d time.Duration, cb func(jc JobContext) bool) int64
func (*TimeoutSchedule) AddCheckJobWithData ¶
func (ts *TimeoutSchedule) AddCheckJobWithData(t time.Time, cb func(jc JobContext) bool, desc string, data map[string]interface{}) int64
func (*TimeoutSchedule) AddCheckJobWithTime ¶
func (ts *TimeoutSchedule) AddCheckJobWithTime(t time.Time, cb func(jc JobContext) bool) int64
func (*TimeoutSchedule) AddCheckJobWithTimeV2 ¶
func (ts *TimeoutSchedule) AddCheckJobWithTimeV2(t time.Time, cb func(jc JobContext) bool, desc string) int64
func (*TimeoutSchedule) RemoveCheckJob ¶
func (ts *TimeoutSchedule) RemoveCheckJob(jid int64)
func (*TimeoutSchedule) Start ¶
func (ts *TimeoutSchedule) Start()
type TimeoutScheduleV2 ¶
type TimeoutScheduleV2 struct {
*skiplist.SkipList
*snowflake.Node
UpdataCb func(JobContextV2) // 注意这个回调函数长时间阻塞可能会导致整个job调度停滞
// contains filtered or unexported fields
}
var TimeoutScheduleInsV2 *TimeoutScheduleV2
func (*TimeoutScheduleV2) AddCheckJob ¶
func (ts *TimeoutScheduleV2) AddCheckJob(jc JobContextV2, cb func(jc JobContextV2) bool) int64
func (*TimeoutScheduleV2) RemoveCheckJob ¶
func (ts *TimeoutScheduleV2) RemoveCheckJob(jid int64)
func (*TimeoutScheduleV2) Start ¶
func (ts *TimeoutScheduleV2) Start()
Click to show internal directories.
Click to hide internal directories.