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
var BannerColor = color.New(color.FgCyan)
View Source
var RootCmd = &cobra.Command{ Use: "k6", Short: "a next-generation load generator", Long: BannerColor.Sprintf("\n%s", consts.Banner()), SilenceUsage: true, SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { logger := logrus.StandardLogger() if !cmd.Flags().Changed("log-output") { if envLogOutput, ok := os.LookupEnv("K6_LOG_OUTPUT"); ok { logOutput = envLogOutput } } err := setupLoggers(logger, logFmt, logOutput) if err != nil { return err } if noColor { stdout.Writer = colorable.NewNonColorable(os.Stdout) stderr.Writer = colorable.NewNonColorable(os.Stderr) } stdlog.SetOutput(logger.Writer()) logger.Debugf("k6 version: v%s", consts.FullVersion()) return nil }, }
RootCmd represents the base command when called without any subcommands.
Functions ¶
Types ¶
type Config ¶
type Config struct {
lib.Options
Out []string `json:"out" envconfig:"K6_OUT"`
Linger null.Bool `json:"linger" envconfig:"K6_LINGER"`
NoUsageReport null.Bool `json:"noUsageReport" envconfig:"K6_NO_USAGE_REPORT"`
NoThresholds null.Bool `json:"noThresholds" envconfig:"K6_NO_THRESHOLDS"`
NoSummary null.Bool `json:"noSummary" envconfig:"K6_NO_SUMMARY"`
SummaryExport null.String `json:"summaryExport" envconfig:"K6_SUMMARY_EXPORT"`
Collectors struct {
InfluxDB influxdb.Config `json:"influxdb"`
Kafka kafka.Config `json:"kafka"`
Cloud cloud.Config `json:"cloud"`
StatsD common.Config `json:"statsd"`
Datadog datadog.Config `json:"datadog"`
CSV csv.Config `json:"csv"`
} `json:"collectors"`
}
type ExitCode ¶
ExitCode wraps the error with an exit code. Hint is used to show details information about underlying error.
type RawFormatter ¶ added in v0.28.0
type RawFormatter struct{}
RawFormatter it does nothing with the message just prints it
Click to show internal directories.
Click to hide internal directories.