tester

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTestTimeout = time.Minute

Variables

View Source
var ErrFailed = errors.New("test failed")

ErrFailed is returned when a test fails

Functions

This section is empty.

Types

type Option

type Option func(*Tester) error

Option is a functional option for extractors.

func WithTestTimeout

func WithTestTimeout(timeout time.Duration) Option

type Options

type Options []Option

Options is a slice of Option.

func (Options) Apply

func (o Options) Apply(t *Tester) error

Apply interates over Options and calls each functional option with a given tester.

type Tester

type Tester struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Tester is a plugin that tests the action outcome in a running Falco instance via the HTTP Output.

func New

func New(alertCh <-chan *alert.Alert, options ...Option) (*Tester, error)

New returns a new Tester instance.

func (*Tester) PostRun

func (t *Tester) PostRun(ctx context.Context, log *logger.Entry, n string, _ events.Action, actErr error) error

PostRun should run after action execution.

func (*Tester) PreRun

func (t *Tester) PreRun(context.Context, *logger.Entry, string, events.Action) (err error)

PreRun should run before action execution.

Jump to

Keyboard shortcuts

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