runner

package module
v0.0.0-...-b1a8a2f Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 5 Imported by: 0

README

runner

A FAIRE.

Licence

MIT.


Copyright (c) 2021 losyme.

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)

func (JHF) Run

func (jhf JHF) Run(job *Job)

type Job

type Job struct {
	*jw.Job
	Logger  jw.Logger
	Factory *factory.Factory
}

type JobHandler

type JobHandler interface {
	Run(job *Job)
}

type PanicHandler

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

type Runner

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

func New

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

func (*Runner) AddJobHandler

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

func (*Runner) Model

func (r *Runner) Model() factory.Model

func (*Runner) Namespace

func (r *Runner) Namespace() string

func (*Runner) RunJob

func (r *Runner) RunJob(job *jw.Job, logger jw.Logger)

func (*Runner) SetPanicHandler

func (r *Runner) SetPanicHandler(panicHandler PanicHandler)

Jump to

Keyboard shortcuts

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