Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Constant constant
Constant scaler that does not allow scaling.
Functions ¶
This section is empty.
Types ¶
type Exponential ¶
type Exponential float32
Exponential scaling mode specifies the factor by which the number of instances should be increased during each scaling attempt. Must be greater than 1.0.
func (Exponential) Apply ¶
func (s Exponential) Apply(n uint32) uint32
Apply scales the supplied value by its factor and returns the result. The result is guaranteed to be greater than the input by at least 1.
func (Exponential) ApplyInverse ¶
func (s Exponential) ApplyInverse(n uint32) uint32
Apply scales the supplied value by its inverse factor and returns the result. The result is guaranteed to be 0 or to be less than the nonzero input by at least 1.
func (Exponential) IsValid ¶
func (s Exponential) IsValid() bool
IsValid checks that its value is greater than 1.
type Incremental ¶
type Incremental uint32
Incremental scaling mode specifies the number of new instances to be added during each scaling attempt. Must be 1 or greater.
func (Incremental) Apply ¶
func (s Incremental) Apply(n uint32) uint32
Apply adds itself to the supplied value and returns the sum.
func (Incremental) ApplyInverse ¶
func (s Incremental) ApplyInverse(n uint32) uint32
If Incremental is greater or equal to the supplied value, ApplyInverse subtracts itself to the argument and returns the difference. Otherwise 0 is returned.
func (Incremental) IsValid ¶
func (s Incremental) IsValid() bool
IsValid checks that its value is greater than 1.