Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnClientLoop ¶
func OnClientLoop( ctx context.Context, client core.Client, node cluster.ClientNode, proc *int64, requestCount *int64, recorder *history.Recorder, )
OnClientLoop sends client requests in a loop, client applies a proc id as it's identifier and if the response is some kinds of `Unknown` type, it will change a proc id on the next loop. Each request costs a requestCount, and loop finishes after requestCount is used up or the `ctx` has been done.
func ParseNemesisGenerators ¶
func ParseNemesisGenerators(names string) (nemesisGens []core.NemesisGenerator)
ParseNemesisGenerators parses NemesisGenerator from string literal
Types ¶
type ClientLoopFunc ¶
type ClientLoopFunc func(ctx context.Context, client core.Client, node cluster.ClientNode, proc *int64, requestCount *int64, recorder *history.Recorder)
ClientLoopFunc defines ClientLoop func
func BuildClientLoopThrottle ¶
func BuildClientLoopThrottle(duration time.Duration) ClientLoopFunc
BuildClientLoopThrottle receives a duration and build a ClientLoopFunc that sends a request every `duration` time
type Suit ¶
type Suit struct {
*control.Config
// Provider deploy the SUT cluster
cluster.Provider
// ClientCreator creates client
core.ClientCreator
// NemesisGens saves NemesisGenerator
NemesisGens []core.NemesisGenerator
// ClientRequestGen
ClientRequestGen ClientLoopFunc
// perform service quality checking
VerifySuit verify.Suit
// cluster definition
ClusterDefs cluster.Cluster
// Plugins
Plugins []control.Plugin
}
Suit is a basic chaos testing suit with configurations to run chaos.
Click to show internal directories.
Click to hide internal directories.