script

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(lc fx.Lifecycle, _ config.Type, _ *startup.Startup) *Engine

func (*Engine) Shutdown

func (e *Engine) Shutdown()

type ErrorHandler

type ErrorHandler struct{}

func (*ErrorHandler) HandleError

func (*ErrorHandler) HandleError(ctx context.Context, job *rivertype.JobRow, err error) *river.ErrorHandlerResult

func (*ErrorHandler) HandlePanic

func (*ErrorHandler) HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any, trace string) *river.ErrorHandlerResult

type ExecScriptWorker

type ExecScriptWorker struct {
	// An embedded WorkerDefaults sets up default methods to fulfill the rest of
	// the Worker interface:
	river.WorkerDefaults[Rule]
}

func (*ExecScriptWorker) Timeout

func (w *ExecScriptWorker) Timeout(job *river.Job[Rule]) time.Duration

func (*ExecScriptWorker) Work

func (w *ExecScriptWorker) Work(ctx context.Context, job *river.Job[Rule]) (err error)

type LogHook

type LogHook struct {
	river.HookDefaults
}

func (*LogHook) InsertBegin

func (l *LogHook) InsertBegin(ctx context.Context, params *rivertype.JobInsertParams) error

func (*LogHook) WorkBegin

func (l *LogHook) WorkBegin(ctx context.Context, job *rivertype.JobRow) error

func (*LogHook) WorkEnd

func (l *LogHook) WorkEnd(ctx context.Context, err error) error

type Rule

type Rule struct {
	Id         string `json:"id" river:"unique"`
	When       string
	Path       string
	Timeout    time.Duration
	Version    string
	Desciption string
	Retries    int
	Echo       bool
	Once       bool
}

func (Rule) InsertOpts

func (r Rule) InsertOpts() river.InsertOpts

func (Rule) Kind

func (Rule) Kind() string

Jump to

Keyboard shortcuts

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