chaos

package
v0.0.0-...-036f8e8 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Re2Prefix re2 regexp string prefix
	Re2Prefix = "re2:"
)

Variables

View Source
var (
	// DockerClient Docker client instance
	DockerClient container.Client
)

Functions

func RunChaosCommand

func RunChaosCommand(topContext context.Context, command Command, params *GlobalParams) error

RunChaosCommand run chaos command in go routine

Types

type Command

type Command interface {
	Run(ctx context.Context, random bool) error
}

Command chaos command

type GlobalParams

type GlobalParams struct {
	Random     bool
	Labels     []string
	Pattern    string
	Names      []string
	Interval   time.Duration
	DryRun     bool
	SkipErrors bool
}

GlobalParams global parameters passed through CLI flags

func ParseGlobalParams

func ParseGlobalParams(c *cli.Context) (*GlobalParams, error)

ParseGlobalParams parse global parameters

Directories

Path Synopsis
cmd
cmd
cmd

Jump to

Keyboard shortcuts

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