cpu

package
v0.0.0-...-ec0eb22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

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

CPU is the interface implementation that manages cpu failure injections

func New

func New(logger log.Logger) *CPU

New will create a new CPU instance with the amount of threads to perform the injection and the channel that will be used to recover it

func (*CPU) Recover

func (cpu *CPU) Recover() (string, error)

Recover will recover cpu failure by closing all channels

func (*CPU) Start

func (cpu *CPU) Start(percentage int) (string, error)

Start will perform a cpu failure injection by starting goroutines in for loops

Jump to

Keyboard shortcuts

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