getevents

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DocLong = `` /* 470-byte string literal not displayed */

DocLong documents the commands with some examples

Variables

View Source
var GetEncoder = func(w io.Writer, colorMode encoder.ColorMode, timestamps bool, compact bool) encoder.EventEncoder {
	if compact {
		return encoder.NewCompactEncoder(w, colorMode, timestamps)
	}
	return json.NewEncoder(w)
}

GetEncoder returns an encoder for an event stream based on configuration options.

View Source
var GetFilter = func() *tetragon.Filter {
	host := viper.GetBool("host")
	namespaces := viper.GetStringSlice("namespace")
	processes := viper.GetStringSlice("process")
	pods := viper.GetStringSlice("pod")

	if host {

		namespaces = append(namespaces, "")
	}

	filter := tetragon.Filter{}
	if len(processes) > 0 {
		filter.BinaryRegex = processes
	}
	if len(namespaces) > 0 {
		filter.Namespace = namespaces
	}
	if len(pods) > 0 {
		filter.PodRegex = pods
	}

	return &filter
}

GetFilter returns a filter for an event stream based on configuration options.

Functions

func New

func New() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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