nemesis

package
v0.0.0-...-057c053 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package nemesis contains pre-built scenarios that introduce problems into distributed systems to try and trigger rare bugs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PartitionMachines

type PartitionMachines struct {
	Addresses []string
	Duration  time.Duration
}

PartitionMachines is a scenario that groups the given addresses in two different sets and disables the network between the groups.

func (PartitionMachines) Run

func (p PartitionMachines) Run()

Run implements Scenario.

type RestartRandomly

type RestartRandomly struct {
	// Machines to choose from for restarting
	Machines []gosim.Machine
	// Time to wait between crashing machine and starting again
	Downtime time.Duration
}

RestartRandomly restarts one randomly chosen machine.

func (RestartRandomly) Run

func (r RestartRandomly) Run()

Run implements Scenario.

type Scenario

type Scenario interface {
	Run()
}

A Scenario is a potentially challenging scenario that can be run and introduce chaos to running machines or a network to see if they keep behaving as expected.

func Repeat

func Repeat(scenario Scenario, times int) Scenario

Repeat repeats the given scenario a number of times.

func Sequence

func Sequence(scenarios ...Scenario) Scenario

Sequence runs the given scenearios in sequence.

type Sleep

type Sleep struct {
	Duration time.Duration
}

Sleep is a scenario that simply sleeps.

func (Sleep) Run

func (s Sleep) Run()

Run implements Scenario.

Jump to

Keyboard shortcuts

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