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"` }
Click to show internal directories.
Click to hide internal directories.