podkillers

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExperimentNumber = 1

Functions

This section is empty.

Types

type Podkillers

type Podkillers struct {
	Id              int
	ExperimentType  string
	NumOfPodsBefore int
	NumOfPodsAfter  int
	Victims         string
	// contains filtered or unexported fields
}

This exposes podkiller metadata for use in displaying results.

func New

func New() *Podkillers

New creates a new podkiller

func (*Podkillers) AddResults

func (p *Podkillers) AddResults(namespace string, victim string)

AddResults saves the names of pods selected to be terminated.

func (*Podkillers) GenerateSummary

func (p *Podkillers) GenerateSummary() string

func (*Podkillers) GetNumOfPods

func (p *Podkillers) GetNumOfPods(namespace string) int

GetNumOfPods returns and saves the current number of pods.

func (*Podkillers) GetStartingPods

func (p *Podkillers) GetStartingPods(namespace string) int

GetStartingPods returns and saves the number of pods at the beginning of the test for reporting purposes.

func (*Podkillers) KillPod

func (p *Podkillers) KillPod(namespace string, podName string) error

KillPod terminates a k8s pod identified by name.

func (*Podkillers) KillPodLike

func (p *Podkillers) KillPodLike(namespace string, keyword string) error

KillPodLike terminates a k8s pod whose name contains string.

func (*Podkillers) KillRandomPod

func (p *Podkillers) KillRandomPod(namespace string) error

KillRandomPod terminates a pod at random.

func (*Podkillers) SetStartingPods

func (p *Podkillers) SetStartingPods(number int)

SetStartingPods saves the number of pods at the beginning of a test as the "before" state.

func (*Podkillers) Timestamp

func (p *Podkillers) Timestamp() string

Timestamp constructs the format of a timestamp for logging purposes

Jump to

Keyboard shortcuts

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