Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertChaosStatus(ctx context.Context, ssChaos *v1alpha1.Chaos, chaos GenericChaos) v1alpha1.ChaosCondition
- func DefaultNetworkChaos() *chaosmeshv1alpha1.NetworkChaos
- func DefaultPodChaos() *chaosmeshv1alpha1.PodChaos
- type BandWidthActionBuilder
- type Builder
- type Chaos
- type GenericChaos
- type Getter
- type NetworkChaos
- type NetworkChaosBuilder
- type PodChaos
- type PodChaosBuilder
- type PodSelectorBuilder
- type Setter
- type StressChaos
Constants ¶
View Source
const ( AnnoPodSelectorMode = "selector.chaos-mesh.org/mode" AnnoPodSelectorValue = "selector.chaos-mesh.org/value" AnnoTargetPodSelectorMode = "target-selector.chaos-mesh.org/mode" AnnoTargetPodSelectorValue = "target-selector.chaos-mesh.org/value" AnnoStressTime = "stresschaos.chaos-mesh.org/time" AnnoStressOOMScoreAdj = "stresschaos.chaos-mesh.org/oomScoreAdj" AnnoNetworkAction = "networkchaos.chaos-mesh.org/action" AnnoNetworkDevice = "networkchaos.chaos-mesh.org/device" AnnoNetworkTargetDevice = "networkchaos.chaos-mesh.org/targetDevice" AnnoNetworkBandwidthRate = "networkchaos.chaos-mesh.org/bandwidth:rate" AnnoNetworkBandwidthLimit = "networkchaos.chaos-mesh.org/bandwidth:limit" AnnoNetworkBandwidthBuffer = "networkchaos.chaos-mesh.org/bandwidth:buffer" AnnoNetworkBandwidthPeakrate = "networkchaos.chaos-mesh.org/bandwidth:peakrate" AnnoNetworkBandwidthMinBurst = "networkchaos.chaos-mesh.org/bandwidth:minburst" )
Variables ¶
Functions ¶
func ConvertChaosStatus ¶
func ConvertChaosStatus(ctx context.Context, ssChaos *v1alpha1.Chaos, chaos GenericChaos) v1alpha1.ChaosCondition
func DefaultNetworkChaos ¶
func DefaultNetworkChaos() *chaosmeshv1alpha1.NetworkChaos
func DefaultPodChaos ¶
func DefaultPodChaos() *chaosmeshv1alpha1.PodChaos
Types ¶
type BandWidthActionBuilder ¶
type BandWidthActionBuilder interface { SetRate(string) BandWidthActionBuilder SetLimit(string) BandWidthActionBuilder SetBuffer(string) BandWidthActionBuilder SetPeakRate(string) BandWidthActionBuilder SetMinBurst(string) BandWidthActionBuilder Build() *chaosmeshv1alpha1.BandwidthSpec }
func NewBandWidthActionBuilder ¶
func NewBandWidthActionBuilder() BandWidthActionBuilder
type Builder ¶
type Builder interface { NewPodChaos(context.Context, *v1alpha1.Chaos) PodChaos NewNetworkChaos(context.Context, *v1alpha1.Chaos) NetworkChaos NewStressChaos(context.Context, *v1alpha1.Chaos) StressChaos }
Builder build Chaos from different parameters
type GenericChaos ¶
type GenericChaos interface{}
type Getter ¶
type Getter interface { GetPodChaosByNamespacedName(context.Context, types.NamespacedName) (PodChaos, error) GetNetworkChaosByNamespacedName(context.Context, types.NamespacedName) (NetworkChaos, error) GetStressChaosByNamespacedName(context.Context, types.NamespacedName) (StressChaos, error) }
Getter get Chaos from different parameters
type NetworkChaos ¶
type NetworkChaos interface{}
func NewNetworkChaos ¶
func NewNetworkChaos(ssChao *v1alpha1.Chaos) (NetworkChaos, error)
type NetworkChaosBuilder ¶
type NetworkChaosBuilder interface { SetNamespace(string) NetworkChaosBuilder SetName(string) NetworkChaosBuilder SetLabels(map[string]string) NetworkChaosBuilder SetAnnotations(map[string]string) NetworkChaosBuilder SetPodSelector(*chaosmeshv1alpha1.PodSelector) NetworkChaosBuilder SetAction(string) NetworkChaosBuilder SetDevice(string) NetworkChaosBuilder SetDuration(*string) NetworkChaosBuilder SetDirection(string) NetworkChaosBuilder SetTarget(*chaosmeshv1alpha1.PodSelector) NetworkChaosBuilder SetTargetDevice(string) NetworkChaosBuilder SetTcParameter(chaosmeshv1alpha1.TcParameter) NetworkChaosBuilder Build() *chaosmeshv1alpha1.NetworkChaos }
func NewNetworkChaosBuilder ¶
func NewNetworkChaosBuilder() NetworkChaosBuilder
type PodChaosBuilder ¶
type PodChaosBuilder interface { SetName(string) PodChaosBuilder SetNamespace(string) PodChaosBuilder SetLabels(map[string]string) PodChaosBuilder SetAnnotations(map[string]string) PodChaosBuilder SetContainerSelector(*chaosmeshv1alpha1.ContainerSelector) PodChaosBuilder SetAction(string) PodChaosBuilder SetDuration(*string) PodChaosBuilder SetGracePeriod(int64) PodChaosBuilder Build() *chaosmeshv1alpha1.PodChaos }
func NewPodChaosBuilder ¶
func NewPodChaosBuilder() PodChaosBuilder
type PodSelectorBuilder ¶
type PodSelectorBuilder interface { // PodSelector SetSelectMode(string) PodSelectorBuilder SetValue(string) PodSelectorBuilder // PodSelectorSpec SetNodes([]string) PodSelectorBuilder SetPods(map[string][]string) PodSelectorBuilder SetNodeSelector(map[string]string) PodSelectorBuilder SetPodPhaseSelectors([]string) PodSelectorBuilder // GenericSelectorSpec SetNamespaces([]string) PodSelectorBuilder SetFieldSelectors(map[string]string) PodSelectorBuilder SetLabelSelector(map[string]string) PodSelectorBuilder SetExpressionSelectors([]metav1.LabelSelectorRequirement) PodSelectorBuilder SetAnnotationSelectors(map[string]string) PodSelectorBuilder Build() *chaosmeshv1alpha1.PodSelector }
func NewPodSelectorBuilder ¶
func NewPodSelectorBuilder() PodSelectorBuilder
type Setter ¶
type Setter interface { CreatePodChaos(context.Context, *v1alpha1.Chaos) error UpdatePodChaos(context.Context, PodChaos, *v1alpha1.Chaos) error DeletePodChaos(context.Context, PodChaos) error CreateNetworkChaos(context.Context, *v1alpha1.Chaos) error UpdateNetworkChaos(context.Context, NetworkChaos, *v1alpha1.Chaos) error DeleteNetworkChaos(context.Context, NetworkChaos) error CreateStressChaos(context.Context, *v1alpha1.Chaos) error UpdateStressChaos(context.Context, StressChaos, *v1alpha1.Chaos) error DeleteStressChaos(context.Context, StressChaos) error }
Setter set Chaos from different parameters
type StressChaos ¶
type StressChaos interface{}
func NewStressChaos ¶
func NewStressChaos(chaos *v1alpha1.Chaos) (StressChaos, error)
Click to show internal directories.
Click to hide internal directories.