runner

package
v0.0.0-...-0bbe938 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JHF

type JHF func(job *Job) *model.JobR

func (JHF) Run

func (jhf JHF) Run(job *Job) *model.JobR

Run AFAIRE.

type Job

type Job struct {
	*model.Job
	Logger  logger.Logger
	Factory *factory.Factory
}

Job AFAIRE.

type JobHandler

type JobHandler interface {
	Run(job *Job) *model.JobR
}

JobHandler AFAIRE.

type PanicHandler

type PanicHandler func(job *model.Job, logger logger.Logger, data interface{}, stack []byte) *model.JobR

PanicHandler AFAIRE.

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner AFAIRE.

func New

func New(namespace string, model model.Model) *Runner

New AFAIRE.

func (*Runner) AddJobHandler

func (r *Runner) AddJobHandler(jobType string, handler JobHandler) error

AddJobHandler AFAIRE.

func (*Runner) Namespace

func (r *Runner) Namespace() string

Namespace AFAIRE.

func (*Runner) RunJob

func (r *Runner) RunJob(job *model.Job, logger logger.Logger) (jr *model.JobR)

RunJob AFAIRE.

func (*Runner) SetPanicHandler

func (r *Runner) SetPanicHandler(panicHandler PanicHandler)

SetPanicHandler AFAIRE.

Jump to

Keyboard shortcuts

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