runner

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

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

Job represents script Job

func (*Job) EntryID added in v0.8.2

func (j *Job) EntryID() cron.EntryID

func (*Job) GetCronLocation added in v0.8.3

func (j *Job) GetCronLocation() *time.Location

func (*Job) GetPriorExecutionTime added in v0.8.3

func (j *Job) GetPriorExecutionTime() time.Duration

func (*Job) Name added in v0.8.2

func (j *Job) Name() string

func (*Job) Run added in v0.7.0

func (j *Job) Run()

Run the job

func (*Job) Script added in v0.8.2

func (j *Job) Script() *script.Script

func (*Job) SetEntryID added in v0.8.2

func (j *Job) SetEntryID(id cron.EntryID)

func (*Job) SetLuaState added in v0.8.2

func (j *Job) SetLuaState(ls *lua.LState)

func (*Job) Stop

func (j *Job) Stop()

Stop the job

type Runner

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

Runner represents the script runner

func New

func New(
	updateInterval time.Duration,
	scriptsManager scriptsManager,
	dsManager dsManager,
	storagesManager storagesManager,
	coreModules []modules.Module,
	cliScript string,
	systemCfg *system.System,
	logger *zap.Logger,
) (*Runner, error)

New creates new script runner

func (*Runner) RunScript added in v0.7.1

func (rnr *Runner) RunScript(name string, req *http.Request) error

RunScript runs the scripts by name

func (*Runner) Stop

func (rnr *Runner) Stop()

Stop the module

func (*Runner) Watch

func (rnr *Runner) Watch(ctx context.Context, ctxCancel context.CancelFunc, once bool)

Watch runs scripts watcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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