Help us shape the future of Go! Take the 2026 Go Developer Survey

command

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package command wraps any load tool behind shell commands: start, stop, rate (with {rate}) and status, whose output may be JSON {"running":..,"rate":..,"sent":..,"failed":..}.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(env core.Env, c *spec.Component) (any, error)

Types

type Gen

type Gen struct {
	// contains filtered or unexported fields
}

func (*Gen) SetRate

func (g *Gen) SetRate(ctx context.Context, rps float64) error

func (*Gen) Start

func (g *Gen) Start(ctx context.Context) error

func (*Gen) Status

func (g *Gen) Status(ctx context.Context) (core.LoadStatus, error)

func (*Gen) Stop

func (g *Gen) Stop(ctx context.Context) error

type Options

type Options struct {
	Start  string `yaml:"start"`
	Stop   string `yaml:"stop"`
	Rate   string `yaml:"rate"`
	Status string `yaml:"status"`
}

Jump to

Keyboard shortcuts

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