Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultLimit is 80% DefaultLimit float64 = 80.0 // DefaultInterval is 333 ms DefaultInterval = time.Millisecond * 333 // DefaultMeasurements is 3 DefaultMeasurements int = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct { MaxCPUUsage float64 MeasureInterval time.Duration Measurements int // contains filtered or unexported fields }
Limiter limits the CPU usage
func (*Limiter) Start ¶
func (l *Limiter) Start()
Start starts the CPU limiter. If there are undefined variables Start() will set them to the default values.
Click to show internal directories.
Click to hide internal directories.