Documentation ¶
Index ¶
- func FetchPods(t require.TestingT, namespace, selector string) []v1.Pod
- func RegisterChaosServer(s *grpc.Server, srv ChaosServer)
- type ChaosClient
- type ChaosServer
- type Chaos_InjectFaultClient
- type Chaos_InjectFaultServer
- type Fault
- func (*Fault) Descriptor() ([]byte, []int)
- func (m *Fault) GetPartition() *Partition
- func (*Fault) ProtoMessage()
- func (m *Fault) Reset()
- func (m *Fault) String() string
- func (m *Fault) XXX_DiscardUnknown()
- func (m *Fault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fault) XXX_Merge(src proto.Message)
- func (m *Fault) XXX_Size() int
- func (m *Fault) XXX_Unmarshal(b []byte) error
- type FaultSet
- type Partition
- func (*Partition) Descriptor() ([]byte, []int)
- func (m *Partition) GetFromIpRange() string
- func (m *Partition) GetInterfaceIndex() string
- func (m *Partition) GetMode() string
- func (*Partition) ProtoMessage()
- func (m *Partition) Reset()
- func (m *Partition) String() string
- func (m *Partition) XXX_DiscardUnknown()
- func (m *Partition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Partition) XXX_Merge(src proto.Message)
- func (m *Partition) XXX_Size() int
- func (m *Partition) XXX_Unmarshal(b []byte) error
- type PartitionMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchPods ¶
FetchPods from Kubernetes using the given namespace and ListOptions. Pods are returned in randomly shuffled order.
func RegisterChaosServer ¶
func RegisterChaosServer(s *grpc.Server, srv ChaosServer)
Types ¶
type ChaosClient ¶
type ChaosClient interface {
InjectFault(ctx context.Context, opts ...grpc.CallOption) (Chaos_InjectFaultClient, error)
}
ChaosClient is the client API for Chaos service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChaosClient ¶
func NewChaosClient(cc *grpc.ClientConn) ChaosClient
type ChaosServer ¶
type ChaosServer interface {
InjectFault(Chaos_InjectFaultServer) error
}
ChaosServer is the server API for Chaos service.
type Chaos_InjectFaultClient ¶
type Chaos_InjectFaultServer ¶
type Fault ¶
type Fault struct { Partition *Partition `protobuf:"bytes,1,opt,name=partition,proto3" json:"partition,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Fault is a union type indicating the variety of Fault to be applied.
func (*Fault) Descriptor ¶
func (*Fault) GetPartition ¶
func (*Fault) ProtoMessage ¶
func (*Fault) ProtoMessage()
func (*Fault) XXX_DiscardUnknown ¶
func (m *Fault) XXX_DiscardUnknown()
func (*Fault) XXX_Marshal ¶
func (*Fault) XXX_Unmarshal ¶
type FaultSet ¶
type FaultSet struct {
// contains filtered or unexported fields
}
FaultSet dispatches a set of removable faults to apply to a collection of Pods.
func NewFaultSet ¶
NewFaultSet returns an empty FaultSet.
func (*FaultSet) Crash ¶
Crash Pods immediately, with no grace period. Crash faults are not remove-able.
func (*FaultSet) Delete ¶
Delete pods using their default GracePeriodSeconds policy. Deletion faults are not remove-able.
type Partition ¶
type Partition struct { // Index of the interface to partition. Can be determined by // querying "/sys/class/net/eth0/iflink" within the target container. InterfaceIndex string `protobuf:"bytes,1,opt,name=interface_index,json=interfaceIndex,proto3" json:"interface_index,omitempty"` // Network IP range to partition from (eg "1.2.3.4/16"). FromIpRange string `protobuf:"bytes,2,opt,name=from_ip_range,json=fromIpRange,proto3" json:"from_ip_range,omitempty"` // Partition mode. REJECT to actively reset connections, DROP to silently // drop packet flows. Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Partition traffic flows of a specific interface from a source IP range, using the given mode (either REJECT or DROP).
func (*Partition) Descriptor ¶
func (*Partition) GetFromIpRange ¶
func (*Partition) GetInterfaceIndex ¶
func (*Partition) ProtoMessage ¶
func (*Partition) ProtoMessage()
func (*Partition) XXX_DiscardUnknown ¶
func (m *Partition) XXX_DiscardUnknown()
func (*Partition) XXX_Marshal ¶
func (*Partition) XXX_Unmarshal ¶
type PartitionMode ¶
type PartitionMode string
PartitionMode to use with `iptables` command; REJECT or DROP.
var ( Drop PartitionMode = "DROP" Reject PartitionMode = "REJECT" )