Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetEncoder = func(w io.Writer, colorMode encoder.ColorMode, timestamps bool, compact bool, tty string, stackTraces bool) encoder.EventEncoder { if tty != "" { return encoder.NewTtyEncoder(w, tty) } if compact { return encoder.NewCompactEncoder(w, colorMode, timestamps, stackTraces) } return encoder.NewProtojsonEncoder(w) }
GetEncoder returns an encoder for an event stream based on configuration options.
View Source
var GetFilter = func() *tetragon.Filter { if Options.Host { Options.Namespaces = append(Options.Namespaces, "") } filter := tetragon.Filter{} if len(Options.Processes) > 0 { filter.BinaryRegex = Options.Processes } if len(Options.Namespaces) > 0 { filter.Namespace = Options.Namespaces } if len(Options.Pods) > 0 { filter.PodRegex = Options.Pods } if len(Options.EventTypes) > 0 { var eventType tetragon.EventType for _, v := range Options.EventTypes { eventType = tetragon.EventType(tetragon.EventType_value[v]) filter.EventSet = append(filter.EventSet, eventType) } } if len(Options.PolicyNames) > 0 { filter.PolicyNames = Options.PolicyNames } return &filter }
GetFilter returns a filter for an event stream based on configuration options.
Functions ¶
Types ¶
type Opts ¶ added in v0.10.0
type Opts struct { Output string Color string IncludeFields []string EventTypes []string ExcludeFields []string Namespaces []string Namespace []string // deprecated: use Namespaces Processes []string Process []string // deprecated: use Processes Pods []string Pod []string // deprecated: use Pods Host bool Timestamps bool TTYEncode string StackTraces bool PolicyNames []string }
var Options Opts
Click to show internal directories.
Click to hide internal directories.