smoke

package
v1.3.191 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Kubeconfig:        "",
	Namespace:         "default",
	PodPrefix:         "grafana-agent",
	FakeRemoteWrite:   false,
	ChaosFrequency:    30 * time.Minute,
	MutationFrequency: 5 * time.Minute,
}

DefaultConfig holds defaults for Smoke settings.

Functions

This section is empty.

Types

type Config

type Config struct {
	Kubeconfig        string
	Namespace         string
	PodPrefix         string
	FakeRemoteWrite   bool
	ChaosFrequency    time.Duration
	MutationFrequency time.Duration
}

Config struct to pass configuration to the Smoke constructor.

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags for the config to the given FlagSet.

type Smoke

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

Smoke is the top level object for a smoke test.

func New

func New(logger log.Logger, cfg Config) (*Smoke, error)

New is the constructor for a Smoke object.

func (*Smoke) Run

func (s *Smoke) Run(ctx context.Context) error

Run starts the smoke test and runs the tasks concurrently.

func (*Smoke) ServeHTTP

func (s *Smoke) ServeHTTP(rw http.ResponseWriter, _ *http.Request)

type Task

type Task interface {
	Run(context.Context) error
}

The Task interface represents some unit of work performed concurrently.

Jump to

Keyboard shortcuts

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