Documentation ¶
Index ¶
- type BinpackingLimiter
- type CombinedLimiter
- func (l *CombinedLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
- func (l *CombinedLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup)
- func (l *CombinedLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string)
- func (l *CombinedLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
- type TimeLimiter
- func (b *TimeLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
- func (b *TimeLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup)
- func (b *TimeLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string)
- func (b *TimeLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinpackingLimiter ¶
type BinpackingLimiter interface { InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup) MarkProcessed(context *context.AutoscalingContext, nodegroupId string) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option) }
BinpackingLimiter processes expansion options to stop binpacking early.
type CombinedLimiter ¶
type CombinedLimiter struct {
// contains filtered or unexported fields
}
CombinedLimiter combines the outcome of multiple limiters. It will limit binpacking when at least one limiter meets the stop condition.
func NewCombinedLimiter ¶
func NewCombinedLimiter(limiters []BinpackingLimiter) *CombinedLimiter
NewCombinedLimiter returns an instance of a new CombinedLimiter.
func (*CombinedLimiter) FinalizeBinpacking ¶
func (l *CombinedLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
FinalizeBinpacking will call FinalizeBinpacking for all the underline limiters.
func (*CombinedLimiter) InitBinpacking ¶
func (l *CombinedLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup)
InitBinpacking initialises all the underline limiters.
func (*CombinedLimiter) MarkProcessed ¶
func (l *CombinedLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string)
MarkProcessed marks the nodegroup as processed in all underline limiters.
func (*CombinedLimiter) StopBinpacking ¶
func (l *CombinedLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
StopBinpacking returns true if at least one of the underline limiter met the stop condition.
type TimeLimiter ¶
type TimeLimiter struct {
// contains filtered or unexported fields
}
TimeLimiter limits binpacking based on the total time spends on binpacking.
func NewTimeLimiter ¶
func NewTimeLimiter(maxBinpackingDuration time.Duration) *TimeLimiter
NewTimeLimiter returns an instance of a new TimeLimiter.
func (*TimeLimiter) FinalizeBinpacking ¶
func (b *TimeLimiter) FinalizeBinpacking(context *context.AutoscalingContext, finalOptions []expander.Option)
FinalizeBinpacking is called to finalize the BinpackingLimiter.
func (*TimeLimiter) InitBinpacking ¶
func (b *TimeLimiter) InitBinpacking(context *context.AutoscalingContext, nodeGroups []cloudprovider.NodeGroup)
InitBinpacking initialises the TimeLimiter.
func (*TimeLimiter) MarkProcessed ¶
func (b *TimeLimiter) MarkProcessed(context *context.AutoscalingContext, nodegroupId string)
MarkProcessed marks the nodegroup as processed.
func (*TimeLimiter) StopBinpacking ¶
func (b *TimeLimiter) StopBinpacking(context *context.AutoscalingContext, evaluatedOptions []expander.Option) bool
StopBinpacking returns true if the binpacking time exceeds maxBinpackingDuration.