chaos

package
v1.2.0 Latest Latest
Warning

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

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

README

chaos

The chaos package provides simple cluster chaos monkey tests to deploy a single distributed set using the dynamic CN node feature in local, and provides the following functionality:

  • random CN node restart
  • Simulate network partitioning
  • Simulates IO errors
  • Simulates network packet loss
  • Simulate disk data errors
  • HTTP interface to control chaos tests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaosTester

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

ChaosTester chaos tester

func NewChaosTester

func NewChaosTester(cfg Config) *ChaosTester

NewChaosTester create chaos tester

func (*ChaosTester) Start

func (t *ChaosTester) Start() error

func (*ChaosTester) Stop

func (t *ChaosTester) Stop() error

type Config

type Config struct {
	// Enable chaos tests
	Enable bool `toml:"enable"`

	// Restart restart tester config
	Restart struct {
		KillInterval    toml.Duration   `toml:"kill-interval"`
		RestartInterval toml.Duration   `toml:"restart-interval"`
		Targets         []int           `toml:"targets"`
		KillFunc        func(int) error `toml:"-"`
		RestartFunc     func(int) error `toml:"-"`
	} `toml:"restart"`
}

Config chaos config

Jump to

Keyboard shortcuts

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