scheduler

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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) Dispose added in v0.6.0

func (instance *Locker) Dispose() error

func (*Locker) Health

func (instance *Locker) Health() health.ServiceHealth

func (*Locker) Init

func (instance *Locker) Init() error

func (*Locker) Lock

func (instance *Locker) Lock(lockContext context.Context, key string) (gocron.Lock, error)

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) Dispose added in v0.6.0

func (instance *Scheduler) Dispose()

func (*Scheduler) Init

func (instance *Scheduler) Init()

func (*Scheduler) RunScheduledTaskImmediate

func (instance *Scheduler) RunScheduledTaskImmediate(key string) error

func (*Scheduler) ScheduleTaskCron

func (instance *Scheduler) ScheduleTaskCron(cron string, key string, task func()) (*gocron.Job, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL