processor

package
v0.0.0-...-6d10cd0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(ctx context.Context, name string, match interface{}, payload *payload.Payload) (matched bool, err error)

Match matches event with specified processor

func Register

func Register(ctx context.Context, processor Processor)

Register register processor in catalog

Types

type NextStatus

type NextStatus int

NextStatus type of sequence statuses

const (
	// NextContinue sequencer should continue execution with the next step
	NextContinue NextStatus = iota
	// NextStopSequence sequencer should stop execution after this step
	NextStopSequence
	// NextRepeatStep sequencer should repeat this step one more time
	NextRepeatStep
)

func Run

func Run(ctx context.Context, reporter report.Driver, name string, script interface{}, event *payload.Event, payload *payload.Payload) (next NextStatus, callback interface{}, responses []payload.Response, err error)

Run executes script with specified processor

type Processor

type Processor interface {
	//Type get type of the Processor
	Type() string
	//Run execution of script
	Run(ctx context.Context, reporter report.Driver, script interface{}, event *payload.Event, payload *payload.Payload) (next NextStatus, callback interface{}, responses []payload.Response, err error)
	//Match execution of match
	Match(ctx context.Context, match interface{}, payload *payload.Payload) (matched bool, err error)
}

Processor represents interface of script executor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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