chaos

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalHook

func GlobalHook(cfg Config) action.AnyHook

GlobalHook returns an AnyHook applying chaos across all actions in a test suite.

func Inject

func Inject[Req, Res any](cfg Config) action.Middleware[Req, Res]

Inject returns an action.Middleware that applies stochastic latency, errors, or panics.

Types

type Config

type Config struct {
	Enabled   bool
	ErrorRate float64
	PanicRate float64
	MaxDelay  time.Duration
}

Jump to

Keyboard shortcuts

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