hexarobfig

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 6 Imported by: 0

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

type ContextGenerator func(ctx context.Context) context.Context

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.

Jump to

Keyboard shortcuts

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