Documentation
¶
Overview ¶
Package periodicprocessor provides cron-based periodic job scheduling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job describes a producer that periodically inserts regular queue tasks.
func NewCronJob ¶
func NewCronJob( name string, cronSpec string, cronLocation *time.Location, factory TaskFactory, opts ...JobOptions, ) (*Job, error)
NewCronJob creates a periodic job from a standard 5-field cron spec.
func NewJob ¶
func NewJob( name string, schedule Scheduler, factory TaskFactory, opts ...JobOptions, ) (*Job, error)
NewJob creates a periodic job from a schedule and task factory.
type JobOptions ¶
type JobOptions func(*Job)
JobOptions configures a periodic job.
func WithRunOnStart ¶
func WithRunOnStart() JobOptions
WithRunOnStart makes a periodic job enqueue one task when the scheduler starts.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor runs one periodic job schedule.
func NewProcessor ¶
func NewProcessor(taskQueueManager TaskQueueManager, job *Job) *Processor
NewProcessor creates a periodic job processor.
type SchedulerFunc ¶
SchedulerFunc adapts a function to the Scheduler interface.
type TaskFactory ¶
TaskFactory creates a task for a scheduled run.
Click to show internal directories.
Click to hide internal directories.