Documentation
¶
Index ¶
Constants ¶
View Source
const (
SubjectLogMatch = "local.match.log.%s.%d.%d"
)
Variables ¶
View Source
var ( ErrExpectedReteMatcher = errors.New("expected rete matcher") ErrExpectedJsonMatcher = errors.New("expected jq json matcher") ErrExpectedJsonMatcherCb = errors.New("expected jq json matcher callback") ErrExpectedLogMatcher = errors.New("expected log matcher") ErrExpectedLogMatcherCb = errors.New("expected log matcher callback") ErrExpectedCbDetect = errors.New("expected detect callback") ErrInvalidCbArgs = errors.New("invalid callback arguments") ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type AssertParamsT ¶
type CbMatchT ¶
func GetLogInverseSeqMatcher ¶
func GetLogInverseSeqMatcher(obj *ObjT) (*lm.InverseSeq, CbMatchT, error)
func GetLogSingleMatcher ¶
func GetLogSingleMatcher(obj *ObjT) (*lm.MatchSingle, CbMatchT, error)
type CompilerOptT ¶
type CompilerOptT func(*compilerOptsT)
func WithDebugTree ¶
func WithDebugTree(path string) CompilerOptT
func WithPlugin ¶
func WithPlugin(scope string, plugin PluginI) CompilerOptT
func WithRuntime ¶
func WithRuntime(cb RuntimeI) CompilerOptT
type CorrelationsT ¶
type MatchParamsT ¶
type NoopRuntime ¶
type NoopRuntime struct{}
-----
func NewNoopRuntime ¶
func NewNoopRuntime() *NoopRuntime
func (*NoopRuntime) NewCbAssert ¶
func (f *NoopRuntime) NewCbAssert(params AssertParamsT) CbAssertT
func (*NoopRuntime) NewCbMatch ¶
func (f *NoopRuntime) NewCbMatch(params MatchParamsT) CbMatchT
type ObjT ¶
type ObjT struct {
RuleId string `json:"rule_id"`
RuleHash string `json:"rule_hash"`
MatchId uint32 `json:"match_id"`
ParentMatchId uint32 `json:"parent_match_id"`
Depth int `json:"depth"`
Scope string `json:"scope"`
Type ast.AstNodeTypeT `json:"type"`
Event ast.AstEventT `json:"event"`
Object any `json:"object"`
Cb CbT `json:"cb"`
}
type RuntimeI ¶
type RuntimeI interface {
NewCbMatch(params MatchParamsT) CbMatchT
NewCbAssert(params AssertParamsT) CbAssertT
}
Click to show internal directories.
Click to hide internal directories.