job

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICommandJob

type ICommandJob interface {
	Run(args ...string) error
}

type ICommandRegister

type ICommandRegister interface {
	Register(name string, cmd ICommandJob)
}

type ICronjobRegister

type ICronjobRegister interface {
	Register(spec string, cmd ICommandJob)
}

type IWrapper

type IWrapper interface {
	FromCommandJob(job ICommandJob, args ...string) cron.Job
}

func NewCronJobWrapper

func NewCronJobWrapper(opts ...WrapperOption) IWrapper

type WrapperOption

type WrapperOption func(*cronJobWrapper)

func WrapWithContext

func WrapWithContext(ctx context.Context) WrapperOption

func WrapWithFailedSaver

func WrapWithFailedSaver(saver func(jobName string, in []string, err error)) WrapperOption

func WrapWithLogger

func WrapWithLogger(log xlog.XLogger) WrapperOption

func WrapWithMaxRetry

func WrapWithMaxRetry(retry uint8) WrapperOption

Jump to

Keyboard shortcuts

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