Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg Config) goresilience.Runner
New returns a new chaos runner. The chaos runner will inject failure using the injector. The injector controls the faults. See Injector to know what kind of failures are controlable.
func NewMiddleware ¶
func NewMiddleware(cfg Config) goresilience.Middleware
NewMiddleware returns a middleware that uses the Runner return by chaos.New.
Types ¶
type Config ¶
type Config struct { // Injector is the failer injector for the chaos runner. Injector *Injector }
Config is the configuration of the chaos runner.
type Injector ¶
type Injector struct {
// contains filtered or unexported fields
}
Injector will control how the faults will be injected in the chaos runner.
func (*Injector) SetErrorPercent ¶
SetErrorPercent will set the error percent on the injector.
func (*Injector) SetLatency ¶
SetLatency will set the latency on the injector.
Click to show internal directories.
Click to hide internal directories.