scalingengine

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveScheduleNotFoundError

type ActiveScheduleNotFoundError struct {
}

func (*ActiveScheduleNotFoundError) Error

func (ase *ActiveScheduleNotFoundError) Error() string

type AppNotFoundError

type AppNotFoundError struct {
}

type ScalingEngine

type ScalingEngine interface {
	Scale(appId string, trigger *models.Trigger) (*models.AppScalingResult, error)
	ComputeNewInstances(currentInstances int, adjustment string) (int, error)
	SetActiveSchedule(appId string, schedule *models.ActiveSchedule) error
	RemoveActiveSchedule(appId string, scheduleId string) error
}

func NewScalingEngine

func NewScalingEngine(logger lager.Logger, cfClient cf.CFClient, policyDB db.PolicyDB, scalingEngineDB db.ScalingEngineDB, clock clock.Clock, defaultCoolDownSecs int, lockSize int) ScalingEngine

type StripedLock

type StripedLock struct {
	// contains filtered or unexported fields
}

func NewStripedLock

func NewStripedLock(capacity int) *StripedLock

func (*StripedLock) GetLock

func (sl *StripedLock) GetLock(key string) *sync.Mutex

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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