checker

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

This package provides a Tetragon gRPC client multiplexer and an RPCChecker that wraps a MultiEventChecker and uses the gRPC multiplexer to get a stream of events from all Tetragon pods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCChecker

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

RPCChecker checks gRPC events from one or more events streams.

func NewRPCChecker

func NewRPCChecker(checker ec.MultiEventChecker, name string) *RPCChecker

NewRPCChecker constructs a new RPCChecker from a MultiEventChecker.

func (*RPCChecker) Check

func (rc *RPCChecker) Check(connTimeout time.Duration) features.Func

Check returns a feature func that runs event checks.

func (*RPCChecker) CheckInNamespace

func (rc *RPCChecker) CheckInNamespace(connTimeout time.Duration, namespaces ...string) features.Func

CheckInNamespace returns a feature func that runs event checks on events filtered by one or more k8s namespaces.

func (*RPCChecker) CheckWithFilters

func (rc *RPCChecker) CheckWithFilters(connTimeout time.Duration, allowList, denyList []*tetragon.Filter) features.Func

CheckInNamespace returns a feature func that runs event checks on events filtered by one or more filters.

func (*RPCChecker) CheckerYaml

func (rc *RPCChecker) CheckerYaml() (string, error)

CheckerYaml dumps the inner checker's yaml definition

func (*RPCChecker) Logs

func (rc *RPCChecker) Logs() []byte

func (*RPCChecker) Name

func (rc *RPCChecker) Name() string

Name returns the name of the checker

func (*RPCChecker) ResetEventCount

func (rc *RPCChecker) ResetEventCount()

func (*RPCChecker) ResetTimeout

func (rc *RPCChecker) ResetTimeout()

func (*RPCChecker) Wait

func (rc *RPCChecker) Wait(waitTimeout time.Duration) features.Func

Wait returns a features.Func that waits for the checker to have started its checks or fails the test on timeout.

func (*RPCChecker) WithEventLimit

func (rc *RPCChecker) WithEventLimit(limit uint32) *RPCChecker

WithEventLimit sets the event limit for an RPCChecker. If RPCChecker.Check sees more events than the limit, it stops the check loop, calls FinalCheck(), and returns its value.

func (*RPCChecker) WithTimeLimit

func (rc *RPCChecker) WithTimeLimit(limit time.Duration) *RPCChecker

WithTimeLimit sets the time limit for an RPCChecker. RPCChecker.Check takes longer than the time limit, it stops the check loop, calls FinalCheck(), and returns its value.

Jump to

Keyboard shortcuts

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