networkchaos

package
v0.0.0-...-f588f65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAction

func WithAction(action string) func(*NetworkChaos)

WithAction overrides the NetworkChaos Action field.

func WithExternalTargets

func WithExternalTargets(targets []string) func(*NetworkChaos)

WithExternalTargets overrides the ExternalTargets for a NetworkChaos object.

func WithMode

func WithMode(mode string) func(*NetworkChaos)

WithAction overrides the NetworkChaos Mode field.

func WithName

func WithName(name string) func(*NetworkChaos)

WithName overrides the Name field for a NetworkChaos object.

func WithSelectorMode

func WithSelectorMode(mode string) func(*PodSelector)

WithSelectorMode overrides the SelectorMode for a PodSelector.

func WithSelectorNamespace

func WithSelectorNamespace(namespaces []string) func(*PodSelector)

WithSelectorNamespace overrides the namespaces for a PodSelector.

Types

type NetworkChaos

type NetworkChaos chmv1alpha1.NetworkChaos

func New

func New(namespace string, selector *PodSelector, opts ...func(*NetworkChaos)) NetworkChaos

New returns a NetworkChaos object configured with a selector and provided options.

func (NetworkChaos) CheckChaosActive

func (nc NetworkChaos) CheckChaosActive(ctx context.Context, c runtimeClient.Client) (bool, error)

CheckChaosActive checks if a NetworkChaos object indicates a successful injection of Chaos action.

func (NetworkChaos) KubernetesObject

func (nc NetworkChaos) KubernetesObject() client.Object

GetObject returns the actual NetworkChaos object

type PodSelector

type PodSelector = chmv1alpha1.PodSelector

func NewPodLabelSelector

func NewPodLabelSelector(labels map[string]string,
	opts ...func(*PodSelector),
) *PodSelector

NewPodLabelSelector returns a new PodSelector configured using labels and provided options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL