Audit: some refactoring out of types.go (#25511)

* some refactoring out of types.go

* tests for metrics tag, parallelize other tests
This commit is contained in:
Peter Wilson
2024-02-20 09:56:35 +00:00
committed by GitHub
parent 633dae1a6a
commit 808cdfc2d2
9 changed files with 160 additions and 72 deletions

View File

@@ -17,6 +17,13 @@ import (
var _ eventlogger.Node = (*EntryFilter)(nil)
// EntryFilter should be used to filter audit requests and responses which should
// make it to a sink.
type EntryFilter struct {
// the evaluator for the bexpr expression that should be applied by the node.
evaluator *bexpr.Evaluator
}
// NewEntryFilter should be used to create an EntryFilter node.
// The filter supplied should be in bexpr format and reference fields from logical.LogInputBexpr.
func NewEntryFilter(filter string) (*EntryFilter, error) {