Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ErrorProbability is the probability of injecting an error (0.0 - 1.0).
ErrorProbability float64
// InjectedError is the error to be returned when an error is injected.
InjectedError error
// LatencyProbability is the probability of injecting latency (0.0 - 1.0).
LatencyProbability float64
// LatencyDuration is the duration of the latency to be injected.
LatencyDuration time.Duration
}
Config represents the configuration for the chaos injector.
type Injector ¶
type Injector struct {
// contains filtered or unexported fields
}
Injector is the chaos injector that can inject synthetic faults and latency.
func NewInjector ¶
NewInjector creates a new chaos injector with the provided configuration.
func NewInjectorWithRNG ¶
NewInjectorWithRNG creates a new chaos injector with the provided configuration and RNG.
Click to show internal directories.
Click to hide internal directories.