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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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