Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cg ContextGenerator, cron *cron.Cron) hjob.CronJobs
New returns new instance of the Cron Jobs.
func NewCronJobPusher ¶
func NewCronJobPusher(options CronJobsOptions) hjob.CronJobs
NewCronJobPusher returns new instance of the Cron Jobs. It pushes each cron job into a job queue.
Types ¶
type ContextGenerator ¶
ContextGenerator is a generator to generate new context to push as job's context.
type CronJobsOptions ¶
type CronJobsOptions struct { CtxGenerator ContextGenerator Cron *cron.Cron Jobs hjob.Jobs Worker hjob.Worker Logger hlog.Logger // optional }
CronJobsOptions is the options that can provide on create new cron job registerer to push cron jobs.
Click to show internal directories.
Click to hide internal directories.