utils

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommonFlags

func AddCommonFlags(command *cobra.Command, commonFlags *CommonFlags)

func HideFlagTimeout

func HideFlagTimeout(command *cobra.Command)

func WaitForEnd

func WaitForEnd(f *CommonFlags)

WaitForEnd waits until the user-set timeout happened or SIGINT or SIGTERM is sent to us

Types

type CommonFlags

type CommonFlags struct {
	// OutputConfig describes the way output should be printed.
	commonutils.OutputConfig

	// Saves all runtime socket paths
	commonutils.RuntimesSocketPathConfig

	// Containername allows to filter containers by name.
	Containername string

	// The name of the container runtimes to be used separated by comma.
	Runtimes string

	// Host, when set to true, specifies to include all events both from
	// the host and from containers.
	Host bool

	// RuntimeConfigs contains the list of the container runtimes to be used
	// with their specific socket path.
	RuntimeConfigs []*containerutilsTypes.RuntimeConfig

	// Number of seconds that the gadget will run for
	Timeout int

	// ContainerdNamespace is the namespace used by containerd
	ContainerdNamespace string

	// RuntimeProtocol specifies whether to use the CRI API to talk to the runtime.
	// Useful for docker and containerd.
	// CRI-O is always using the CRI API. Podman is always using the internal API.
	// Supported values: internal, cri.
	RuntimeProtocol string
}

CommonFlags contains CLI flags common to several gadgets.

Jump to

Keyboard shortcuts

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