cmd

package
v0.20.0-dev-dccb254863... Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTagEmptyName   = errors.New("Invalid tag, empty name")
	ErrTagEmptyValue  = errors.New("Invalid tag, empty value")
	ErrTagEmptyString = errors.New("Invalid tag, empty string")
)
View Source
View Source
var BannerColor = color.New(color.FgCyan)
View Source
var RootCmd = &cobra.Command{
	Use:           "k6",
	Short:         "a next-generation load generator",
	Long:          BannerColor.Sprint(Banner),
	SilenceUsage:  true,
	SilenceErrors: true,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		setupLoggers(logFmt)
		if noColor {
			stdout.Writer = colorable.NewNonColorable(os.Stdout)
			stdout.Writer = colorable.NewNonColorable(os.Stderr)
		}
	},
}

RootCmd represents the base command when called without any subcommands.

View Source
var Version = "0.20.0"

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Config

type Config struct {
	lib.Options

	Out           null.String `json:"out" envconfig:"out"`
	Linger        null.Bool   `json:"linger" envconfig:"linger"`
	NoUsageReport null.Bool   `json:"noUsageReport" envconfig:"no_usage_report"`
	NoThresholds  null.Bool   `json:"noThresholds" envconfig:"no_thresholds"`

	Collectors struct {
		InfluxDB influxdb.Config `json:"influxdb"`
		Cloud    cloud.Config    `json:"cloud"`
	} `json:"collectors"`
}

func (Config) Apply

func (c Config) Apply(cfg Config) Config

type ExitCode

type ExitCode struct {
	Code int
	// contains filtered or unexported fields
}

Silently set an exit code.

Jump to

Keyboard shortcuts

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