Documentation ¶
Index ¶
- Variables
- type CronJobTimerHeap
- type ICronTimer
- type SCronJob
- type SCronJobManager
- func (self *SCronJobManager) AddJobAtIntervals(name string, interval time.Duration, jobFunc TCronJobFunction) error
- func (self *SCronJobManager) AddJobAtIntervalsWithStarTime(name string, interval time.Duration, jobFunc TCronJobFunctionWithStartTime) error
- func (self *SCronJobManager) AddJobAtIntervalsWithStarTimeStartRun(name string, interval time.Duration, jobFunc TCronJobFunctionWithStartTime, ...) error
- func (self *SCronJobManager) AddJobAtIntervalsWithStartRun(name string, interval time.Duration, jobFunc TCronJobFunction, startRun bool) error
- func (self *SCronJobManager) AddJobEveryFewDays(name string, day, hour, min, sec int, jobFunc TCronJobFunction, startRun bool) error
- func (self *SCronJobManager) AddJobEveryFewHour(name string, hour, min, sec int, jobFunc TCronJobFunction, startRun bool) error
- func (self *SCronJobManager) IsNameUnique(name string) bool
- func (self *SCronJobManager) Remove(name string) error
- func (self *SCronJobManager) Start()
- func (self *SCronJobManager) Start2(ctx context.Context, electObj *elect.Elect)
- func (self *SCronJobManager) Stop()
- func (self *SCronJobManager) String() string
- type TCronJobFunction
- type TCronJobFunctionWithStartTime
- type Timer1
- type Timer2
- type TimerHour
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAdminSessionGenerator = auth.AdminCredential ErrCronJobNameConflict = errors.Error("Cron job Name Conflict") )
Functions ¶
This section is empty.
Types ¶
type CronJobTimerHeap ¶
type CronJobTimerHeap []*SCronJob
func (CronJobTimerHeap) Len ¶
func (cjth CronJobTimerHeap) Len() int
func (CronJobTimerHeap) Less ¶
func (cjth CronJobTimerHeap) Less(i, j int) bool
func (*CronJobTimerHeap) Pop ¶
func (cjth *CronJobTimerHeap) Pop() interface{}
func (*CronJobTimerHeap) Push ¶
func (cjth *CronJobTimerHeap) Push(x interface{})
func (CronJobTimerHeap) String ¶
func (c CronJobTimerHeap) String() string
func (CronJobTimerHeap) Swap ¶
func (cjth CronJobTimerHeap) Swap(i, j int)
type SCronJob ¶
type SCronJob struct { Name string Timer ICronTimer Next time.Time StartRun bool // contains filtered or unexported fields }
type SCronJobManager ¶
type SCronJobManager struct {
// contains filtered or unexported fields
}
func GetCronJobManager ¶
func GetCronJobManager() *SCronJobManager
func InitCronJobManager ¶
func InitCronJobManager(isDbWorker bool, workerCount int) *SCronJobManager
func (*SCronJobManager) AddJobAtIntervals ¶
func (self *SCronJobManager) AddJobAtIntervals(name string, interval time.Duration, jobFunc TCronJobFunction) error
func (*SCronJobManager) AddJobAtIntervalsWithStarTime ¶
func (self *SCronJobManager) AddJobAtIntervalsWithStarTime(name string, interval time.Duration, jobFunc TCronJobFunctionWithStartTime) error
func (*SCronJobManager) AddJobAtIntervalsWithStarTimeStartRun ¶
func (self *SCronJobManager) AddJobAtIntervalsWithStarTimeStartRun(name string, interval time.Duration, jobFunc TCronJobFunctionWithStartTime, startRun bool) error
func (*SCronJobManager) AddJobAtIntervalsWithStartRun ¶
func (self *SCronJobManager) AddJobAtIntervalsWithStartRun(name string, interval time.Duration, jobFunc TCronJobFunction, startRun bool) error
func (*SCronJobManager) AddJobEveryFewDays ¶
func (self *SCronJobManager) AddJobEveryFewDays(name string, day, hour, min, sec int, jobFunc TCronJobFunction, startRun bool) error
func (*SCronJobManager) AddJobEveryFewHour ¶
func (self *SCronJobManager) AddJobEveryFewHour(name string, hour, min, sec int, jobFunc TCronJobFunction, startRun bool) error
func (*SCronJobManager) IsNameUnique ¶
func (self *SCronJobManager) IsNameUnique(name string) bool
func (*SCronJobManager) Remove ¶
func (self *SCronJobManager) Remove(name string) error
func (*SCronJobManager) Start ¶
func (self *SCronJobManager) Start()
func (*SCronJobManager) Start2 ¶
func (self *SCronJobManager) Start2(ctx context.Context, electObj *elect.Elect)
func (*SCronJobManager) Stop ¶
func (self *SCronJobManager) Stop()
func (*SCronJobManager) String ¶
func (self *SCronJobManager) String() string
type TCronJobFunction ¶
type TCronJobFunction func(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
Click to show internal directories.
Click to hide internal directories.