cobra

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlagsFromViper added in v0.17.2

func GetFlagsFromViper(key string) ([]string, error)

GetFlagsFromViper returns a slice of flags from a given config key. It relies on the fact that the config key is a viper.Gettable and that the config value complies with the cliFlagger interface (when structured).

func GetTrackerRunner

func GetTrackerRunner(c *cobra.Command, version string) (cmd.Runner, error)

Types

type CRIConfig added in v0.17.2

type CRIConfig struct {
	Name   string `mapstructure:"name"`
	Socket string `mapstructure:"socket"`
}

type CacheConfig added in v0.17.2

type CacheConfig struct {
	Type string `mapstructure:"type"`
	Size int    `mapstructure:"size"`
}

type CapabilitiesConfig added in v0.17.2

type CapabilitiesConfig struct {
	Bypass bool     `mapstructure:"bypass"`
	Add    []string `mapstructure:"add"`
	Drop   []string `mapstructure:"drop"`
}

type DnsCacheConfig added in v0.17.2

type DnsCacheConfig struct {
	Enable bool `mapstructure:"enable"`
	Size   int  `mapstructure:"size"`
}

type LogAggregateConfig added in v0.17.2

type LogAggregateConfig struct {
	Enabled       bool   `mapstructure:"enabled"`
	FlushInterval string `mapstructure:"flush-interval"`
}

type LogConfig added in v0.17.2

type LogConfig struct {
	Level     string             `mapstructure:"level"`
	File      string             `mapstructure:"file"`
	Aggregate LogAggregateConfig `mapstructure:"aggregate"`
	Filters   LogFilterConfig    `mapstructure:"filters"`
}

type LogFilterAttributes added in v0.17.2

type LogFilterAttributes struct {
	Msg   []string `mapstructure:"msg"`
	Pkg   []string `mapstructure:"pkg"`
	File  []string `mapstructure:"file"`
	Level []string `mapstructure:"lvl"`
	Regex []string `mapstructure:"regex"`
}

type LogFilterConfig added in v0.17.2

type LogFilterConfig struct {
	LibBPF bool                `mapstructure:"libbpf"`
	In     LogFilterAttributes `mapstructure:"in"`
	Out    LogFilterAttributes `mapstructure:"out"`
}

type OutputConfig added in v0.17.2

type OutputConfig struct {
	Options      OutputOptsConfig               `mapstructure:"options"`
	Table        OutputFormatConfig             `mapstructure:"table"`
	TableVerbose OutputFormatConfig             `mapstructure:"table-verbose"`
	JSON         OutputFormatConfig             `mapstructure:"json"`
	Gob          OutputFormatConfig             `mapstructure:"gob"`
	GoTemplate   OutputGoTemplateConfig         `mapstructure:"gotemplate"`
	Forwards     map[string]OutputForwardConfig `mapstructure:"forward"`
	Webhooks     map[string]OutputWebhookConfig `mapstructure:"webhook"`
}

type OutputFormatConfig added in v0.17.2

type OutputFormatConfig struct {
	Files []string `mapstructure:"files"`
}

type OutputForwardConfig added in v0.17.2

type OutputForwardConfig struct {
	Protocol string `mapstructure:"protocol"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Tag      string `mapstructure:"tag"`
}

type OutputGoTemplateConfig added in v0.17.2

type OutputGoTemplateConfig struct {
	Template string   `mapstructure:"template"`
	Files    []string `mapstructure:"files"`
}

type OutputOptsConfig added in v0.17.2

type OutputOptsConfig struct {
	None              bool `mapstructure:"none"`
	StackAddresses    bool `mapstructure:"stack-addresses"`
	ExecEnv           bool `mapstructure:"exec-env"`
	RelativeTime      bool `mapstructure:"relative-time"`
	ExecHash          bool `mapstructure:"exec-hash"`
	ParseArguments    bool `mapstructure:"parse-arguments"`
	ParseArgumentsFDs bool `mapstructure:"parse-arguments-fds"`
	SortEvents        bool `mapstructure:"sort-events"`
}

type OutputWebhookConfig added in v0.17.2

type OutputWebhookConfig struct {
	Protocol    string `mapstructure:"protocol"`
	Host        string `mapstructure:"host"`
	Port        int    `mapstructure:"port"`
	Timeout     string `mapstructure:"timeout"`
	GoTemplate  string `mapstructure:"gotemplate"`
	ContentType string `mapstructure:"content-type"`
}

type ProcTreeCacheConfig added in v0.17.2

type ProcTreeCacheConfig struct {
	Process int `mapstructure:"process"`
	Thread  int `mapstructure:"thread"`
}

type ProcTreeConfig added in v0.17.2

type ProcTreeConfig struct {
	Source string              `mapstructure:"source"`
	Cache  ProcTreeCacheConfig `mapstructure:"cache"`
}

type RegoConfig added in v0.17.2

type RegoConfig struct {
	PartialEval bool `mapstructure:"partial-eval"`
	AIO         bool `mapstructure:"aio"`
}

Jump to

Keyboard shortcuts

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