control

package
v0.0.0-...-58360b6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DB is the name which we want to run.
	DB string
	// Nodes are address of nodes.
	Nodes []string

	// RunRound controls how many round the controller runs tests.
	RunRound int
	// RunTime controls how long a round takes.
	RunTime time.Duration
	// RequestCount controls how many requests a client sends to the db.
	RequestCount int

	// History file
	History string
}

Config is the configuration for the controller.

type Controller

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

Controller controls the whole cluster. It sends request to the database, and also uses nemesis to disturb the cluster. Here have only 5 nodes, and the hosts are n1 - n5.

func NewController

func NewController(
	ctx context.Context,
	cfg *Config,
	clientCreator core.ClientCreator,
	nemesisGenerators []core.NemesisGenerator,
	verifySuit verify.Suit,
) *Controller

NewController creates a controller.

func (*Controller) Close

func (c *Controller) Close()

Close closes the controller.

func (*Controller) Run

func (c *Controller) Run()

Run runs the controller.

Jump to

Keyboard shortcuts

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