chaos

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAMESPACE  = metav1.NamespaceDefault
	IDENTIFIER = "kube-monkey-id"
	KIND       = "Pod"
	NAME       = "name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chaos

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

func New

func New(killtime time.Time, victim victims.Victim) *Chaos

New creates a new Chaos instance

func NewMock

func NewMock() *Chaos

func (*Chaos) DurationToKillTime

func (c *Chaos) DurationToKillTime() time.Duration

Calculates the duration from now until Chaos.killAt

func (*Chaos) Execute

func (c *Chaos) Execute(resultchan chan<- *Result)

Exposed function that calls the actual execution of the chaos, i.e. termination of pods The result is sent back over the channel provided

func (*Chaos) KillAt

func (c *Chaos) KillAt() time.Time

func (*Chaos) NewResult

func (c *Chaos) NewResult(e error) *Result

Create a ChaosResult instance

func (*Chaos) Schedule

func (c *Chaos) Schedule(resultchan chan<- *Result)

Schedule the execution of Chaos

func (*Chaos) Victim

func (c *Chaos) Victim() victims.Victim

type Result

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

func (*Result) Error

func (r *Result) Error() error

func (*Result) Victim

func (r *Result) Victim() victims.Victim

Jump to

Keyboard shortcuts

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