scaler

package
v0.9.55 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaler

type AutoScaler struct {
	Max *int64

	Threshold *int64
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

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