network

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NController

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

func NewNetworkController

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

func (*NController) NetworkAction

func (n *NController) NetworkAction(w http.ResponseWriter, r *http.Request)

NetworkAction godoc @Summary Inject network failures @Description Start and stop network failures @Tags Failure injections @Accept json @Produce json @Param action query string true "Specify to perform a start or recover for a network failure injection" Enums(start, recover) @Param requestPayload body RequestPayload true "Specify the job name, device name, target and netem injection arguments" @Success 200 {object} response.Payload @Failure 400 {string} http.Error @Failure 500 {string} http.Error @Router /network [post]

type RequestPayload

type RequestPayload struct {
	Job           string  `json:"job"`
	Device        string  `json:"device"`
	Target        string  `json:"target"`
	Latency       uint32  `json:"latency"`
	DelayCorr     float32 `json:"delay correlation"`
	Limit         uint32  `json:"limit"`
	Loss          float32 `json:"loss"`
	LossCorr      float32 `json:"loss correlation"`
	Gap           uint32  `json:"gap"`
	Duplicate     float32 `json:"duplicate"`
	DuplicateCorr float32 `json:"duplicate correlation"`
	Jitter        uint32  `json:"jitter"`
	ReorderProb   float32 `json:"reorder probability"`
	ReorderCorr   float32 `json:"reorder correlation"`
	CorruptProb   float32 `json:"corrupt probability"`
	CorruptCorr   float32 `json:"corrupt correlation"`
}

Jump to

Keyboard shortcuts

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