Documentation
¶
Index ¶
- type AutoScaler
- func (as *AutoScaler) Disable()
- func (as *AutoScaler) Enable()
- func (as *AutoScaler) IsOn() bool
- func (as *AutoScaler) ScaleAnts(pool *ants.Pool, validated int64, dispensed int64) bool
- func (as *AutoScaler) SetBaseline(baseline int)
- func (as *AutoScaler) SetMax(max int)
- func (as *AutoScaler) SetThreshold(threshold int)
- func (as *AutoScaler) StateString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScaler ¶
func NewAutoScaler ¶
func NewAutoScaler(baseline int, max int, differenceThreshold int) *AutoScaler
func (*AutoScaler) Disable ¶
func (as *AutoScaler) Disable()
func (*AutoScaler) Enable ¶
func (as *AutoScaler) Enable()
func (*AutoScaler) IsOn ¶
func (as *AutoScaler) IsOn() bool
func (*AutoScaler) ScaleAnts ¶
func (as *AutoScaler) ScaleAnts(pool *ants.Pool, validated int64, dispensed int64) bool
ScaleAnts scales the pool, it returns true if the pool scale has been changed, and false if not.
func (*AutoScaler) SetBaseline ¶ added in v0.7.94
func (as *AutoScaler) SetBaseline(baseline int)
func (*AutoScaler) SetMax ¶ added in v0.7.94
func (as *AutoScaler) SetMax(max int)
func (*AutoScaler) SetThreshold ¶ added in v0.7.94
func (as *AutoScaler) SetThreshold(threshold int)
func (*AutoScaler) StateString ¶
func (as *AutoScaler) StateString() string
Click to show internal directories.
Click to hide internal directories.