engine

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRuleNotFound      = errors.New("rule not found")
	ErrUnknownObjectType = errors.New("unknown object type")
	ErrExpectedMatcherCb = errors.New("expected matcher callback")
	ErrDuplicateRule     = errors.New("duplicate rule")
	ErrNoRules           = errors.New("no rules provided")
	ErrMissingCreId      = errors.New("missing cre id")
)

Functions

func GetEventSource

func GetEventSource(obj *compiler.ObjT) parser.ParseEventT

func NewRuntime

func NewRuntime(cb runtimeCb) *runtimeT

Types

type LogData

type LogData = resolve.LogData

type RuleMatchersT

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

func (*RuleMatchersT) DataSourceTemplate added in v0.1.4

func (r *RuleMatchersT) DataSourceTemplate(currRulesVer *semver.Version) ([]byte, error)

type RuntimeT

type RuntimeT struct {
	Stop  int64
	Ux    ux.UxFactoryI
	Rules map[string]parser.ParseCreT
	// contains filtered or unexported fields
}

func New

func New(stop int64, ux ux.UxFactoryI) *RuntimeT

func (*RuntimeT) AddRules

func (r *RuntimeT) AddRules(rules *parser.RulesT) error

func (*RuntimeT) Close

func (r *RuntimeT) Close() error

func (*RuntimeT) CompileRules

func (r *RuntimeT) CompileRules(ruleData []byte, report *ux.ReportT) (*RuleMatchersT, error)

Permit wasm compile rules from a byte slice

func (*RuntimeT) CompileRulesPath

func (r *RuntimeT) CompileRulesPath(rulesPaths []utils.RulePathT, report *ux.ReportT) (*RuleMatchersT, error)

func (*RuntimeT) LoadRulesPaths

func (r *RuntimeT) LoadRulesPaths(rep *ux.ReportT, rulesPaths []utils.RulePathT) (*RuleMatchersT, error)

func (*RuntimeT) Run

func (r *RuntimeT) Run(ctx context.Context, ruleMatchers *RuleMatchersT, sources []*LogData, report *ux.ReportT) error

type TrkRdr

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

func (*TrkRdr) Read

func (r *TrkRdr) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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