Documentation ¶
Index ¶
- func WithAction(action string) func(*NetworkChaos)
- func WithExternalTargets(targets []string) func(*NetworkChaos)
- func WithMode(mode string) func(*NetworkChaos)
- func WithName(name string) func(*NetworkChaos)
- func WithSelectorMode(mode string) func(*PodSelector)
- func WithSelectorNamespace(namespaces []string) func(*PodSelector)
- type NetworkChaos
- type PodSelector
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.