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 2024 Datadog, Inc.
Index ¶
- func Reinit(safetyNets []Safemode, disruption v1beta1.Disruption, k8sClient client.Client)
- type CPU
- type ContainerFailure
- type DNS
- type DiskFailure
- type DiskPressure
- type GRPC
- type Generic
- type Network
- type Node
- type Safemode
- type SafemodeMock
- type SafemodeMock_Expecter
- type SafemodeMock_Init_Call
- func (_c *SafemodeMock_Init_Call) Return() *SafemodeMock_Init_Call
- func (_c *SafemodeMock_Init_Call) Run(run func(disruption v1beta1.Disruption, _a1 client.Client)) *SafemodeMock_Init_Call
- func (_c *SafemodeMock_Init_Call) RunAndReturn(run func(v1beta1.Disruption, client.Client)) *SafemodeMock_Init_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerFailure ¶
type ContainerFailure struct {
// contains filtered or unexported fields
}
func (*ContainerFailure) Init ¶
func (sm *ContainerFailure) Init(disruption v1beta1.Disruption, client client.Client)
Init Refer to safemode.Safemode interface for documentation
type DiskFailure ¶
type DiskFailure struct {
// contains filtered or unexported fields
}
func (*DiskFailure) Init ¶
func (sm *DiskFailure) Init(disruption v1beta1.Disruption, client client.Client)
Init Refer to safemode.Safemode interface for documentation
type DiskPressure ¶
type DiskPressure struct {
// contains filtered or unexported fields
}
func (*DiskPressure) Init ¶
func (sm *DiskPressure) Init(disruption v1beta1.Disruption, client client.Client)
Init Refer to safemode.Safemode interface for documentation
type Safemode ¶
type Safemode interface { // Init will grab the necessary spec depending on the type (e.g. SafemodeNetwork will grab NetworkDisruptionSpec) // and grab the disruption itself for data such as the kubernetes namespace the disruption is running on // It will also grab the kube client for functions that require state information from k8s system Init(disruption v1beta1.Disruption, client client.Client) }
func AddAllSafemodeObjects ¶
func AddAllSafemodeObjects(disruption v1beta1.Disruption, k8sClient client.Client) []Safemode
AddAllSafemodeObjects will populate a list of Safemode objects with Safemode's related to the disruptions described in the disruption in question. Once populated, the list can be traversed and run with the same function which applies all safety nets for each Safemode object.
type SafemodeMock ¶
SafemodeMock is an autogenerated mock type for the Safemode type
func NewSafemodeMock ¶
func NewSafemodeMock(t interface { mock.TestingT Cleanup(func()) }) *SafemodeMock
NewSafemodeMock creates a new instance of SafemodeMock. 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 (*SafemodeMock) EXPECT ¶
func (_m *SafemodeMock) EXPECT() *SafemodeMock_Expecter
func (*SafemodeMock) Init ¶
func (_m *SafemodeMock) Init(disruption v1beta1.Disruption, _a1 client.Client)
Init provides a mock function with given fields: disruption, _a1
type SafemodeMock_Expecter ¶
type SafemodeMock_Expecter struct {
// contains filtered or unexported fields
}
func (*SafemodeMock_Expecter) Init ¶
func (_e *SafemodeMock_Expecter) Init(disruption interface{}, _a1 interface{}) *SafemodeMock_Init_Call
Init is a helper method to define mock.On call
- disruption v1beta1.Disruption
- _a1 client.Client
type SafemodeMock_Init_Call ¶
SafemodeMock_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
func (*SafemodeMock_Init_Call) Return ¶
func (_c *SafemodeMock_Init_Call) Return() *SafemodeMock_Init_Call
func (*SafemodeMock_Init_Call) Run ¶
func (_c *SafemodeMock_Init_Call) Run(run func(disruption v1beta1.Disruption, _a1 client.Client)) *SafemodeMock_Init_Call
func (*SafemodeMock_Init_Call) RunAndReturn ¶
func (_c *SafemodeMock_Init_Call) RunAndReturn(run func(v1beta1.Disruption, client.Client)) *SafemodeMock_Init_Call