Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics represents the collection of metrics internally set by scaler.
func NewMetrics ¶
func NewMetrics() Metrics
NewMetrics returns the metrics collection needed for the SAA.
type Option ¶ added in v0.0.10
type Option func(c *Scaler)
Option represents an option for the Scaler
func DryRunMode ¶ added in v0.0.10
DryRunMode can be used to activate/ deactivate the dry run mode. In dry run mode no automatic scaling will executed. For more information see ../doc/DryRunMode.md
func MaxOpenScalingTickets ¶ added in v0.0.10
MaxOpenScalingTickets specifies how many scaling tickets can be open at the same time
func WatcherInterval ¶ added in v0.0.10
WatcherInterval specifies the interval the scaleObjectWatcher will use to check if the scale still matches the current expectation
func WithLogger ¶ added in v0.0.10
WithLogger adds a configured Logger to the Scaler
type Scaler ¶
type Scaler struct {
// contains filtered or unexported fields
}
Scaler is a component responsible for scaling a scalingObject
func New ¶ added in v0.0.10
func New(scalingTarget ScalingTarget, scalingObject ScalingObject, metrics Metrics, options ...Option) (*Scaler, error)
New creates a new instance of a scaler using the given ScalingTarget to send scaling events to.
func (*Scaler) GetTimeOfLastScaleAction ¶ added in v0.0.10
GetTimeOfLastScaleAction returns that point in time where the most recent scaling STARTED.
type ScalingObject ¶ added in v0.0.10
ScalingObject config of the ScalingObject to be scaled
type ScalingTarget ¶
type ScalingTarget interface { AdjustScalingObjectCount(scalingObject string, min uint, max uint, from uint, to uint) error GetScalingObjectCount(scalingObject string) (uint, error) IsScalingObjectDead(scalingObject string) (bool, error) String() string }
ScalingTarget represents the interface to be implemented in order to be used by the Scaler as scaling target.
type ScalingTicket ¶
type ScalingTicket struct {
// contains filtered or unexported fields
}
ScalingTicket represents a ticket/ scalingObject to express the whish to scale and to track the state of the scaling.
func NewScalingTicket ¶
func NewScalingTicket(desiredCount uint, force bool) ScalingTicket
NewScalingTicket creates and opens/ issues a new ScalingTicket