chaos

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	// GetSpec returns the current specification of the deployment
	GetSpec() api.DeploymentSpec
	// DeletePod deletes a pod with given name in the namespace
	// of the deployment. If the pod does not exist, the error is ignored.
	DeletePod(podName string) error
	// GetOwnedPods returns a list of all pods owned by the deployment.
	GetOwnedPods() ([]v1.Pod, error)
}

Context provides methods to the chaos package.

type Monkey

type Monkey struct {
	// contains filtered or unexported fields
}

Monkey is the service that introduces chaos in the deployment if allowed and enabled.

func NewMonkey

func NewMonkey(log zerolog.Logger, context Context) *Monkey

NewMonkey creates a new chaos monkey with given context.

func (Monkey) Run

func (m Monkey) Run(stopCh <-chan struct{})

Run the monkey until the given channel is closed.

Jump to

Keyboard shortcuts

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