cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 24 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 NewList

func NewList() *cobra.Command

NewRun instantiates the list subcommand.

func NewRun

func NewRun() *cobra.Command

NewRun instantiates the run 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
	LogLevel   string `validate:"logrus" name:"log level" default:"info"`
}

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
JackTT - Gopher 🇻🇳