cmd

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNamespace = "default"

DefaultNamespace const contains the name of the default Kubernetes namespace.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute creates the root command and runs it.

func New

func New(configOptions *ConfigOptions) *cobra.Command

New instantiates the root command.

func NewBench added in v0.5.0

func NewBench() *cobra.Command

NewBench instantiates the bench subcommand.

func NewList

func NewList() *cobra.Command

NewList instantiates the list subcommand.

func NewRun

func NewRun() *cobra.Command

NewRun instantiates the run subcommand.

func NewTest added in v0.4.0

func NewTest() *cobra.Command

NewTest instantiates the test subcommand.

func WithSignals

func WithSignals(ctx context.Context) context.Context

WithSignals returns a copy of ctx with a new Done channel. The returned context's Done channel is closed when a SIGKILL or SIGTERM signal is received.

Types

type ConfigOptions

type ConfigOptions struct {
	ConfigFile string `validate:"filepath" name:"config"`
	LogLevel   string `validate:"logrus" name:"loglevel" default:"info"`
	LogFormat  string `validate:"format" name:"logformat" default:"text"`
}

ConfigOptions represent the persistent configuration flags of event-generator.

func NewConfigOptions

func NewConfigOptions() *ConfigOptions

NewConfigOptions creates an instance of ConfigOptions.

func (*ConfigOptions) Validate

func (co *ConfigOptions) Validate() []error

Validate validates the ConfigOptions fields.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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