Documentation ¶
Overview ¶
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2025 Datadog, Inc.
Index ¶
- Constants
- type CPUStressArgsBuilder
- type CPUStressArgsBuilderMock
- type CPUStressArgsBuilderMock_Expecter
- type CPUStressArgsBuilderMock_GenerateArgs_Call
- func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) Return(_a0 []string) *CPUStressArgsBuilderMock_GenerateArgs_Call
- func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) Run(run func(_a0 int)) *CPUStressArgsBuilderMock_GenerateArgs_Call
- func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) RunAndReturn(run func(int) []string) *CPUStressArgsBuilderMock_GenerateArgs_Call
- type Config
- type ContainerFailureInjectorConfig
- type DNSDisruptionInjector
- type DNSDisruptionInjectorConfig
- type DiskFailureInjector
- type DiskFailureInjectorConfig
- type DiskPressureInjectorConfig
- type FileWriter
- type FileWriterMock
- type FileWriterMock_Expecter
- type FileWriterMock_Write_Call
- func (_c *FileWriterMock_Write_Call) Return(_a0 error) *FileWriterMock_Write_Call
- func (_c *FileWriterMock_Write_Call) Run(run func(path string, mode fs.FileMode, data string)) *FileWriterMock_Write_Call
- func (_c *FileWriterMock_Write_Call) RunAndReturn(run func(string, fs.FileMode, string) error) *FileWriterMock_Write_Call
- type GRPCDisruptionInjector
- type GRPCDisruptionInjectorConfig
- type Injector
- func NewCPUPressureInjector(config Config, count string, injectorCmdFactory InjectorCmdFactory, ...) Injector
- func NewCPUStressInjector(config Config, percentage int, process process.Manager, ...) Injector
- func NewContainerFailureInjector(spec v1beta1.ContainerFailureSpec, config ContainerFailureInjectorConfig) Injector
- func NewDNSDisruptionInjector(spec v1beta1.DNSDisruptionSpec, config DNSDisruptionInjectorConfig) (Injector, error)
- func NewDiskFailureInjector(spec v1beta1.DiskFailureSpec, config DiskFailureInjectorConfig) (Injector, error)
- func NewDiskPressureInjector(spec v1beta1.DiskPressureSpec, config DiskPressureInjectorConfig) (Injector, error)
- func NewGRPCDisruptionInjector(spec v1beta1.GRPCDisruptionSpec, config GRPCDisruptionInjectorConfig) Injector
- func NewNetworkDisruptionInjector(spec v1beta1.NetworkDisruptionSpec, config NetworkDisruptionInjectorConfig) (Injector, error)
- func NewNodeFailureInjector(spec v1beta1.NodeFailureSpec, config NodeFailureInjectorConfig) (Injector, error)
- type InjectorCmdFactory
- type InjectorCmdFactoryMock
- type InjectorCmdFactoryMock_Expecter
- type InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
- func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Return(_a0 command.BackgroundCmd, _a1 context.CancelFunc, _a2 error) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
- func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Run(...) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
- func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) RunAndReturn(...) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
- type InjectorMock
- type InjectorMock_Clean_Call
- type InjectorMock_Expecter
- func (_e *InjectorMock_Expecter) Clean() *InjectorMock_Clean_Call
- func (_e *InjectorMock_Expecter) GetDisruptionKind() *InjectorMock_GetDisruptionKind_Call
- func (_e *InjectorMock_Expecter) Inject() *InjectorMock_Inject_Call
- func (_e *InjectorMock_Expecter) TargetName() *InjectorMock_TargetName_Call
- func (_e *InjectorMock_Expecter) UpdateConfig(config interface{}) *InjectorMock_UpdateConfig_Call
- type InjectorMock_GetDisruptionKind_Call
- func (_c *InjectorMock_GetDisruptionKind_Call) Return(_a0 types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call
- func (_c *InjectorMock_GetDisruptionKind_Call) Run(run func()) *InjectorMock_GetDisruptionKind_Call
- func (_c *InjectorMock_GetDisruptionKind_Call) RunAndReturn(run func() types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call
- type InjectorMock_Inject_Call
- type InjectorMock_TargetName_Call
- type InjectorMock_UpdateConfig_Call
- type InjectorState
- type NetworkDisruptionInjectorConfig
- type NodeFailureInjectorConfig
Constants ¶
const ( ChaosInjectorBinaryLocation = "/usr/local/bin/chaos-injector" ParentPIDFlag flag = "parent-pid" DeadlineFlag flag = "deadline" )
const EBPFDiskFailureCmd = "bpf-disk-failure"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUStressArgsBuilder ¶
type CPUStressArgsBuilderMock ¶
CPUStressArgsBuilderMock is an autogenerated mock type for the CPUStressArgsBuilder type
func NewCPUStressArgsBuilderMock ¶
func NewCPUStressArgsBuilderMock(t interface { mock.TestingT Cleanup(func()) }) *CPUStressArgsBuilderMock
NewCPUStressArgsBuilderMock creates a new instance of CPUStressArgsBuilderMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*CPUStressArgsBuilderMock) EXPECT ¶
func (_m *CPUStressArgsBuilderMock) EXPECT() *CPUStressArgsBuilderMock_Expecter
func (*CPUStressArgsBuilderMock) GenerateArgs ¶
func (_m *CPUStressArgsBuilderMock) GenerateArgs(_a0 int) []string
GenerateArgs provides a mock function with given fields: _a0
type CPUStressArgsBuilderMock_Expecter ¶
type CPUStressArgsBuilderMock_Expecter struct {
// contains filtered or unexported fields
}
func (*CPUStressArgsBuilderMock_Expecter) GenerateArgs ¶
func (_e *CPUStressArgsBuilderMock_Expecter) GenerateArgs(_a0 interface{}) *CPUStressArgsBuilderMock_GenerateArgs_Call
GenerateArgs is a helper method to define mock.On call
- _a0 int
type CPUStressArgsBuilderMock_GenerateArgs_Call ¶
CPUStressArgsBuilderMock_GenerateArgs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateArgs'
func (*CPUStressArgsBuilderMock_GenerateArgs_Call) Return ¶
func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) Return(_a0 []string) *CPUStressArgsBuilderMock_GenerateArgs_Call
func (*CPUStressArgsBuilderMock_GenerateArgs_Call) Run ¶
func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) Run(run func(_a0 int)) *CPUStressArgsBuilderMock_GenerateArgs_Call
func (*CPUStressArgsBuilderMock_GenerateArgs_Call) RunAndReturn ¶
func (_c *CPUStressArgsBuilderMock_GenerateArgs_Call) RunAndReturn(run func(int) []string) *CPUStressArgsBuilderMock_GenerateArgs_Call
type Config ¶
type Config struct { Log *zap.SugaredLogger MetricsSink metrics.Sink TargetContainer container.Container DisruptionDeadline time.Time Cgroup cgroup.Manager Netns netns.Manager K8sClient kubernetes.Interface DNS network.DNSConfig Disruption chaosapi.DisruptionArgs InjectorCtx context.Context }
Config represents a generic injector config
func (Config) TargetName ¶
TargetName returns the name of the target that relates to this configuration node name if the disruption if at the node level target container name if available UnknownTargetName otherwise
type ContainerFailureInjectorConfig ¶
ContainerFailureInjectorConfig contains needed drivers to create a ContainerFailureInjector
type DNSDisruptionInjector ¶
type DNSDisruptionInjector struct {
// contains filtered or unexported fields
}
DNSDisruptionInjector describes a dns disruption
func (*DNSDisruptionInjector) Clean ¶
func (i *DNSDisruptionInjector) Clean() error
Clean removes the injected disruption from the given container
func (*DNSDisruptionInjector) GetDisruptionKind ¶
func (i *DNSDisruptionInjector) GetDisruptionKind() chaostypes.DisruptionKindName
func (*DNSDisruptionInjector) Inject ¶
func (i *DNSDisruptionInjector) Inject() error
Inject injects the given dns disruption into the given container
func (*DNSDisruptionInjector) TargetName ¶
func (i *DNSDisruptionInjector) TargetName() string
func (*DNSDisruptionInjector) UpdateConfig ¶
func (i *DNSDisruptionInjector) UpdateConfig(config Config)
type DNSDisruptionInjectorConfig ¶
type DNSDisruptionInjectorConfig struct { Config DisruptionName string DisruptionNamespace string TargetName string FileWriter FileWriter IPTables network.IPTables CmdFactory command.Factory ProcessManager process.Manager }
DNSDisruptionInjectorConfig contains all needed drivers to create a dns disruption using `iptables`
type DiskFailureInjector ¶
type DiskFailureInjector struct {
// contains filtered or unexported fields
}
func (*DiskFailureInjector) Clean ¶
func (i *DiskFailureInjector) Clean() error
func (*DiskFailureInjector) GetDisruptionKind ¶
func (i *DiskFailureInjector) GetDisruptionKind() types.DisruptionKindName
func (*DiskFailureInjector) Inject ¶
func (i *DiskFailureInjector) Inject() error
func (*DiskFailureInjector) TargetName ¶
func (i *DiskFailureInjector) TargetName() string
func (*DiskFailureInjector) UpdateConfig ¶
func (i *DiskFailureInjector) UpdateConfig(config Config)
type DiskFailureInjectorConfig ¶
type DiskFailureInjectorConfig struct { Config CmdFactory command.Factory ProcessManager process.Manager BPFConfigInformer ebpf.ConfigInformer }
DiskFailureInjectorConfig is the disk pressure injector config
type DiskPressureInjectorConfig ¶
DiskPressureInjectorConfig is the disk pressure injector config
type FileWriter ¶
FileWriter is a component allowing to write the given data to the given file
type FileWriterMock ¶
FileWriterMock is an autogenerated mock type for the FileWriter type
func NewFileWriterMock ¶
func NewFileWriterMock(t interface { mock.TestingT Cleanup(func()) }) *FileWriterMock
NewFileWriterMock creates a new instance of FileWriterMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*FileWriterMock) EXPECT ¶
func (_m *FileWriterMock) EXPECT() *FileWriterMock_Expecter
type FileWriterMock_Expecter ¶
type FileWriterMock_Expecter struct {
// contains filtered or unexported fields
}
func (*FileWriterMock_Expecter) Write ¶
func (_e *FileWriterMock_Expecter) Write(path interface{}, mode interface{}, data interface{}) *FileWriterMock_Write_Call
Write is a helper method to define mock.On call
- path string
- mode fs.FileMode
- data string
type FileWriterMock_Write_Call ¶
FileWriterMock_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
func (*FileWriterMock_Write_Call) Return ¶
func (_c *FileWriterMock_Write_Call) Return(_a0 error) *FileWriterMock_Write_Call
func (*FileWriterMock_Write_Call) Run ¶
func (_c *FileWriterMock_Write_Call) Run(run func(path string, mode fs.FileMode, data string)) *FileWriterMock_Write_Call
func (*FileWriterMock_Write_Call) RunAndReturn ¶
func (_c *FileWriterMock_Write_Call) RunAndReturn(run func(string, fs.FileMode, string) error) *FileWriterMock_Write_Call
type GRPCDisruptionInjector ¶
type GRPCDisruptionInjector struct {
// contains filtered or unexported fields
}
GRPCDisruptionInjector describes a grpc disruption
func (*GRPCDisruptionInjector) Clean ¶
func (i *GRPCDisruptionInjector) Clean() error
Clean removes the injected disruption from the given container
func (*GRPCDisruptionInjector) GetDisruptionKind ¶
func (i *GRPCDisruptionInjector) GetDisruptionKind() types.DisruptionKindName
func (*GRPCDisruptionInjector) Inject ¶
func (i *GRPCDisruptionInjector) Inject() error
Inject injects the given grpc disruption into the given container
func (*GRPCDisruptionInjector) TargetName ¶
func (i *GRPCDisruptionInjector) TargetName() string
func (*GRPCDisruptionInjector) UpdateConfig ¶
func (i *GRPCDisruptionInjector) UpdateConfig(config Config)
type GRPCDisruptionInjectorConfig ¶
type GRPCDisruptionInjectorConfig struct { Config State InjectorState }
GRPCDisruptionInjectorConfig contains all needed drivers to create a grpc disruption
type Injector ¶
type Injector interface { GetDisruptionKind() types.DisruptionKindName Inject() error TargetName() string UpdateConfig(config Config) Clean() error }
Injector is an interface being able to inject or clean disruptions
func NewCPUPressureInjector ¶
func NewCPUPressureInjector(config Config, count string, injectorCmdFactory InjectorCmdFactory, argsBuilder CPUStressArgsBuilder) Injector
NewCPUPressureInjector creates a CPU pressure injector with the given config
func NewCPUStressInjector ¶
func NewCPUStressInjector(config Config, percentage int, process process.Manager, runtime process.Runtime) Injector
NewCPUPressureInjector creates a CPU pressure injector with the given config
func NewContainerFailureInjector ¶
func NewContainerFailureInjector(spec v1beta1.ContainerFailureSpec, config ContainerFailureInjectorConfig) Injector
NewContainerFailureInjector creates a ContainerFailureInjector object with the given config, missing fields being initialized with the defaults
func NewDNSDisruptionInjector ¶
func NewDNSDisruptionInjector(spec v1beta1.DNSDisruptionSpec, config DNSDisruptionInjectorConfig) (Injector, error)
NewDNSDisruptionInjector creates a DNSDisruptionInjector object with the given config, missing fields are initialized with the defaults
func NewDiskFailureInjector ¶
func NewDiskFailureInjector(spec v1beta1.DiskFailureSpec, config DiskFailureInjectorConfig) (Injector, error)
NewDiskFailureInjector creates a disk failure injector with the given config
func NewDiskPressureInjector ¶
func NewDiskPressureInjector(spec v1beta1.DiskPressureSpec, config DiskPressureInjectorConfig) (Injector, error)
NewDiskPressureInjector creates a disk pressure injector with the given config
func NewGRPCDisruptionInjector ¶
func NewGRPCDisruptionInjector(spec v1beta1.GRPCDisruptionSpec, config GRPCDisruptionInjectorConfig) Injector
NewGRPCDisruptionInjector creates a GRPCDisruptionInjector object with the given config, missing fields are initialized with the defaults
func NewNetworkDisruptionInjector ¶
func NewNetworkDisruptionInjector(spec v1beta1.NetworkDisruptionSpec, config NetworkDisruptionInjectorConfig) (Injector, error)
NewNetworkDisruptionInjector creates a NetworkDisruptionInjector object with the given config, missing field being initialized with the defaults
func NewNodeFailureInjector ¶
func NewNodeFailureInjector(spec v1beta1.NodeFailureSpec, config NodeFailureInjectorConfig) (Injector, error)
NewNodeFailureInjector creates a NodeFailureInjector object with the given config, missing fields being initialized with the defaults
type InjectorCmdFactory ¶
type InjectorCmdFactory interface {
NewInjectorBackgroundCmd(deadline time.Time, disruptionArgs chaosapi.DisruptionArgs, target string, args []string) (command.BackgroundCmd, context.CancelFunc, error)
}
func NewInjectorCmdFactory ¶
func NewInjectorCmdFactory(log *zap.SugaredLogger, processManager process.Manager, cmdBuilder command.Factory) InjectorCmdFactory
type InjectorCmdFactoryMock ¶
InjectorCmdFactoryMock is an autogenerated mock type for the InjectorCmdFactory type
func NewInjectorCmdFactoryMock ¶
func NewInjectorCmdFactoryMock(t interface { mock.TestingT Cleanup(func()) }) *InjectorCmdFactoryMock
NewInjectorCmdFactoryMock creates a new instance of InjectorCmdFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*InjectorCmdFactoryMock) EXPECT ¶
func (_m *InjectorCmdFactoryMock) EXPECT() *InjectorCmdFactoryMock_Expecter
func (*InjectorCmdFactoryMock) NewInjectorBackgroundCmd ¶
func (_m *InjectorCmdFactoryMock) NewInjectorBackgroundCmd(deadline time.Time, disruptionArgs api.DisruptionArgs, target string, args []string) (command.BackgroundCmd, context.CancelFunc, error)
NewInjectorBackgroundCmd provides a mock function with given fields: deadline, disruptionArgs, target, args
type InjectorCmdFactoryMock_Expecter ¶
type InjectorCmdFactoryMock_Expecter struct {
// contains filtered or unexported fields
}
func (*InjectorCmdFactoryMock_Expecter) NewInjectorBackgroundCmd ¶
func (_e *InjectorCmdFactoryMock_Expecter) NewInjectorBackgroundCmd(deadline interface{}, disruptionArgs interface{}, target interface{}, args interface{}) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
NewInjectorBackgroundCmd is a helper method to define mock.On call
- deadline time.Time
- disruptionArgs api.DisruptionArgs
- target string
- args []string
type InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call ¶
InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewInjectorBackgroundCmd'
func (*InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Return ¶
func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Return(_a0 command.BackgroundCmd, _a1 context.CancelFunc, _a2 error) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
func (*InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Run ¶
func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) Run(run func(deadline time.Time, disruptionArgs api.DisruptionArgs, target string, args []string)) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
func (*InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) RunAndReturn ¶
func (_c *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call) RunAndReturn(run func(time.Time, api.DisruptionArgs, string, []string) (command.BackgroundCmd, context.CancelFunc, error)) *InjectorCmdFactoryMock_NewInjectorBackgroundCmd_Call
type InjectorMock ¶
InjectorMock is an autogenerated mock type for the Injector type
func NewInjectorMock ¶
func NewInjectorMock(t interface { mock.TestingT Cleanup(func()) }) *InjectorMock
NewInjectorMock creates a new instance of InjectorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*InjectorMock) Clean ¶
func (_m *InjectorMock) Clean() error
Clean provides a mock function with given fields:
func (*InjectorMock) EXPECT ¶
func (_m *InjectorMock) EXPECT() *InjectorMock_Expecter
func (*InjectorMock) GetDisruptionKind ¶
func (_m *InjectorMock) GetDisruptionKind() types.DisruptionKindName
GetDisruptionKind provides a mock function with given fields:
func (*InjectorMock) Inject ¶
func (_m *InjectorMock) Inject() error
Inject provides a mock function with given fields:
func (*InjectorMock) TargetName ¶
func (_m *InjectorMock) TargetName() string
TargetName provides a mock function with given fields:
func (*InjectorMock) UpdateConfig ¶
func (_m *InjectorMock) UpdateConfig(config Config)
UpdateConfig provides a mock function with given fields: config
type InjectorMock_Clean_Call ¶
InjectorMock_Clean_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clean'
func (*InjectorMock_Clean_Call) Return ¶
func (_c *InjectorMock_Clean_Call) Return(_a0 error) *InjectorMock_Clean_Call
func (*InjectorMock_Clean_Call) Run ¶
func (_c *InjectorMock_Clean_Call) Run(run func()) *InjectorMock_Clean_Call
func (*InjectorMock_Clean_Call) RunAndReturn ¶
func (_c *InjectorMock_Clean_Call) RunAndReturn(run func() error) *InjectorMock_Clean_Call
type InjectorMock_Expecter ¶
type InjectorMock_Expecter struct {
// contains filtered or unexported fields
}
func (*InjectorMock_Expecter) Clean ¶
func (_e *InjectorMock_Expecter) Clean() *InjectorMock_Clean_Call
Clean is a helper method to define mock.On call
func (*InjectorMock_Expecter) GetDisruptionKind ¶
func (_e *InjectorMock_Expecter) GetDisruptionKind() *InjectorMock_GetDisruptionKind_Call
GetDisruptionKind is a helper method to define mock.On call
func (*InjectorMock_Expecter) Inject ¶
func (_e *InjectorMock_Expecter) Inject() *InjectorMock_Inject_Call
Inject is a helper method to define mock.On call
func (*InjectorMock_Expecter) TargetName ¶
func (_e *InjectorMock_Expecter) TargetName() *InjectorMock_TargetName_Call
TargetName is a helper method to define mock.On call
func (*InjectorMock_Expecter) UpdateConfig ¶
func (_e *InjectorMock_Expecter) UpdateConfig(config interface{}) *InjectorMock_UpdateConfig_Call
UpdateConfig is a helper method to define mock.On call
- config Config
type InjectorMock_GetDisruptionKind_Call ¶
InjectorMock_GetDisruptionKind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDisruptionKind'
func (*InjectorMock_GetDisruptionKind_Call) Return ¶
func (_c *InjectorMock_GetDisruptionKind_Call) Return(_a0 types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call
func (*InjectorMock_GetDisruptionKind_Call) Run ¶
func (_c *InjectorMock_GetDisruptionKind_Call) Run(run func()) *InjectorMock_GetDisruptionKind_Call
func (*InjectorMock_GetDisruptionKind_Call) RunAndReturn ¶
func (_c *InjectorMock_GetDisruptionKind_Call) RunAndReturn(run func() types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call
type InjectorMock_Inject_Call ¶
InjectorMock_Inject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inject'
func (*InjectorMock_Inject_Call) Return ¶
func (_c *InjectorMock_Inject_Call) Return(_a0 error) *InjectorMock_Inject_Call
func (*InjectorMock_Inject_Call) Run ¶
func (_c *InjectorMock_Inject_Call) Run(run func()) *InjectorMock_Inject_Call
func (*InjectorMock_Inject_Call) RunAndReturn ¶
func (_c *InjectorMock_Inject_Call) RunAndReturn(run func() error) *InjectorMock_Inject_Call
type InjectorMock_TargetName_Call ¶
InjectorMock_TargetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TargetName'
func (*InjectorMock_TargetName_Call) Return ¶
func (_c *InjectorMock_TargetName_Call) Return(_a0 string) *InjectorMock_TargetName_Call
func (*InjectorMock_TargetName_Call) Run ¶
func (_c *InjectorMock_TargetName_Call) Run(run func()) *InjectorMock_TargetName_Call
func (*InjectorMock_TargetName_Call) RunAndReturn ¶
func (_c *InjectorMock_TargetName_Call) RunAndReturn(run func() string) *InjectorMock_TargetName_Call
type InjectorMock_UpdateConfig_Call ¶
InjectorMock_UpdateConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConfig'
func (*InjectorMock_UpdateConfig_Call) Return ¶
func (_c *InjectorMock_UpdateConfig_Call) Return() *InjectorMock_UpdateConfig_Call
func (*InjectorMock_UpdateConfig_Call) Run ¶
func (_c *InjectorMock_UpdateConfig_Call) Run(run func(config Config)) *InjectorMock_UpdateConfig_Call
func (*InjectorMock_UpdateConfig_Call) RunAndReturn ¶
func (_c *InjectorMock_UpdateConfig_Call) RunAndReturn(run func(Config)) *InjectorMock_UpdateConfig_Call
type InjectorState ¶
type InjectorState string
const ( Created InjectorState = "created" Injected InjectorState = "injected" Cleaned InjectorState = "cleaned" UnknownTargetName = "unknown target name" )
type NetworkDisruptionInjectorConfig ¶
type NetworkDisruptionInjectorConfig struct { Config TrafficController network.TrafficController IPTables network.IPTables NetlinkAdapter network.NetlinkAdapter DNSClient network.DNSClient HostResolveInterval time.Duration BPFConfigInformer ebpf.ConfigInformer }
NetworkDisruptionInjectorConfig contains all needed drivers to create a network disruption using `tc`
type NodeFailureInjectorConfig ¶
type NodeFailureInjectorConfig struct { Config FileWriter FileWriter WaitBeforeShutdown time.Duration }
NodeFailureInjectorConfig contains needed drivers to create a NodeFailureInjector
Source Files ¶
- container_failure.go
- cpu_pressure.go
- cpu_stress.go
- cpu_stress_args_builder_mock.go
- disk_failure.go
- disk_pressure.go
- dns_disruption.go
- factory.go
- file_writer.go
- file_writer_mock.go
- grpc_disruption.go
- injector.go
- injector_cmd_factory_mock.go
- injector_mock.go
- ipresolver.go
- link_operation_mock.go
- network_disruption.go
- node_failure.go