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 *cache.Manager, logger log.Logger, ) *CController
func (*CController) CPUAction ¶
func (c *CController) CPUAction(w http.ResponseWriter, r *http.Request)
CalcExample godoc @Summary Inject CPU failures @Description Perform CPU spike injection. Provide a percentage that is proportionate to your logical CPUs. E.g. With 4 logical CPUs if you want to inject 40% CPU failure we calculate that as ( numCpu * percentage / 100 ) so we will block 1 CPU, effectively injecting failure 25% @Tags Failure injections @Accept json @Produce json @Param action query string true "Specify to perform a start or a stop for the CPU injection" @Param requestPayload body RequestPayload true "Specify the job name, percentage and target" @Success 200 {object} response.Payload @Failure 400 {object} response.Payload @Failure 500 {object} response.Payload @Router /cpu [post]