Documentation
¶
Index ¶
- func Default() ctx.ServicePackage
- type Locker
- type Scheduler
- func (instance *Scheduler) AfterStart()
- func (instance *Scheduler) BeforeStop()
- func (instance *Scheduler) Dispose()
- func (instance *Scheduler) Init()
- func (instance *Scheduler) RunScheduledTaskImmediate(key string) error
- func (instance *Scheduler) ScheduleTaskCron(cron string, key string, task func()) (*gocron.Job, error)
- func (instance *Scheduler) ScheduleTaskCronContext(cron string, key string, task func(context.Context)) (*gocron.Job, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
func Default() ctx.ServicePackage
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
func (*Locker) BeforeStop ¶ added in v0.6.0
func (instance *Locker) BeforeStop()
func (*Locker) Health ¶
func (instance *Locker) Health() health.ServiceHealth
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) AfterStart ¶
func (instance *Scheduler) AfterStart()
func (*Scheduler) BeforeStop ¶
func (instance *Scheduler) BeforeStop()
func (*Scheduler) RunScheduledTaskImmediate ¶
func (*Scheduler) ScheduleTaskCron ¶
func (*Scheduler) ScheduleTaskCronContext ¶ added in v0.6.0
func (instance *Scheduler) ScheduleTaskCronContext(cron string, key string, task func(context.Context)) (*gocron.Job, error)
ScheduleTaskCronContext schedules a task with the current scheduler-generation context. Shutdown cancels that context before waiting for running jobs to return.
Click to show internal directories.
Click to hide internal directories.