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

tool

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: 18 Imported by: 0

Documentation

Overview

Package tool drives an external load tool (k6, vegeta, ghz) as a rig load generator: the tool runs as a child process at the current rate and its per-request results stream back into the counters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

Types

type Gen

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

func (*Gen) Close

func (g *Gen) Close() error

func (*Gen) SetRate

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

func (*Gen) Start

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

func (*Gen) Status

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

func (*Gen) Stop

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

type Options

type Options struct {
	Target  string            `yaml:"target"`
	Method  string            `yaml:"method"`
	Body    string            `yaml:"body"`
	Headers map[string]string `yaml:"headers"`
	Rate    float64           `yaml:"rate"`
	// k6
	Script string `yaml:"script"`
	VUs    int    `yaml:"vus"`
	// ghz
	Proto    string   `yaml:"proto"`
	Call     string   `yaml:"call"`
	Data     string   `yaml:"data"`
	Insecure bool     `yaml:"insecure"`
	Args     []string `yaml:"args"`
}

Jump to

Keyboard shortcuts

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