cpu

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CController

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

func NewCPUController

func NewCPUController(
	jobs map[string]*config.Job,
	connections *network.Connections,
	cache *gocache.Cache,
	loggers chaoslogger.Loggers,
) *CController

func (*CController) CPUAction

func (c *CController) CPUAction(w http.ResponseWriter, r *http.Request)

CPUAction godoc @Summary Inject CPU failures @Description Perform CPU spike injection. Provide a percentage and the cpu usage will increase based on it @Tags Failure injections @Accept json @Produce json @Param action query string true "Specify to perform a start or a recover for the CPU injection" Enums(start, recover) @Param requestPayload body RequestPayload true "Specify the job name, percentage and target" @Success 200 {object} response.Payload @Failure 400 {string} http.Error @Failure 500 {string} http.Error @Router /cpu [post]

type RequestPayload

type RequestPayload struct {
	Job        string `json:"job"`
	Percentage int32  `json:"percentage"`
	Target     string `json:"target"`
}

Jump to

Keyboard shortcuts

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