Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPodNotFound means operate pod may be deleted(almostly) ErrPodNotFound = errors.New("pod not found") // ErrPodNotRunning means operate pod may be not working // and it's non-sense to make changes on it. ErrPodNotRunning = errors.New("pod not running") )
Functions ¶
This section is empty.
Types ¶
type Append ¶
type Append struct {
Item interface{}
}
Append adds an item to corresponding list in podnetworkchaos
type Builder ¶
type Builder struct { Log logr.Logger client.Client client.Reader // contains filtered or unexported fields }
func NewBuilder ¶
func (*Builder) WithInit ¶
func (b *Builder) WithInit(source string, key types.NamespacedName) *PodIOManager
type CommitResponse ¶
type CommitResponse struct { Key types.NamespacedName Err error }
CommitResponse is a tuple (Key, Err)
type PodIOManager ¶
type PodIOManager struct { Source string Log logr.Logger client.Client client.Reader Key types.NamespacedName T *PodIOTransaction // contains filtered or unexported fields }
PodIOManager will save all the related podiochaos
func (*PodIOManager) CreateNewPodIOChaos ¶
func (m *PodIOManager) CreateNewPodIOChaos(ctx context.Context) error
type PodIOTransaction ¶
type PodIOTransaction struct {
Steps []Step
}
PodIOTransaction represents a modification on podnetwork
func (*PodIOTransaction) Append ¶
func (t *PodIOTransaction) Append(item interface{}) error
Append adds an item to corresponding list in podnetworkchaos
func (*PodIOTransaction) Apply ¶
func (t *PodIOTransaction) Apply(chaos *v1alpha1.PodIOChaos) error
Apply runs every step on the chaos
func (*PodIOTransaction) Clear ¶
func (t *PodIOTransaction) Clear(source string)
Clear will clear all related items in podnetworkchaos
func (*PodIOTransaction) SetContainer ¶
func (t *PodIOTransaction) SetContainer(container string) error
func (*PodIOTransaction) SetVolumePath ¶
func (t *PodIOTransaction) SetVolumePath(path string) error
SetVolumePath sets the volumePath field of podiochaos
type SetContainer ¶
type SetContainer struct {
Container string
}
SetContainer sets the container field of podiochaos
func (*SetContainer) Apply ¶
func (s *SetContainer) Apply(chaos *v1alpha1.PodIOChaos) error
Apply runs this action
type SetVolumePath ¶
type SetVolumePath struct {
Path string
}
SetVolumePath sets the volumePath field of podiochaos
func (*SetVolumePath) Apply ¶
func (s *SetVolumePath) Apply(chaos *v1alpha1.PodIOChaos) error
Apply runs this action
type Step ¶
type Step interface { // Apply will apply an action on podnetworkchaos Apply(chaos *v1alpha1.PodIOChaos) error }
Step represents a step of PodIOTransaction
Click to show internal directories.
Click to hide internal directories.