util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DeploymentAnnotationMaxScale = "prometheusScaler/max-scale"
View Source
const DeploymentAnnotationMinScale = "prometheusScaler/min-scale"
View Source
const DeploymentAnnotationPrometheusQuery = "prometheusScaler/prometheus-query"
View Source
const DeploymentAnnotationScaleDownWhen = "prometheusScaler/scale-down-when"
View Source
const DeploymentAnnotationScaleRelative = "prometheusScaler/scale-relative"
View Source
const DeploymentAnnotationScaleTo = "prometheusScaler/scale-to"
View Source
const DeploymentAnnotationScaleUpWhen = "prometheusScaler/scale-up-when"

Variables

This section is empty.

Functions

func CalculateNewScale

func CalculateNewScale(scalable Scalable, result float64) (int64, error)

func MakePrometheusQueryFunc

func MakePrometheusQueryFunc(url string) (func(query string) (float64, error), error)

Types

type BaseScalable

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

func (*BaseScalable) GetCurScale

func (s *BaseScalable) GetCurScale() int64

func (*BaseScalable) GetQuery

func (s *BaseScalable) GetQuery() string

type DirectScalable

type DirectScalable struct {
	BaseScalable
	// contains filtered or unexported fields
}

type RelativeScalable

type RelativeScalable struct {
	BaseScalable
	// contains filtered or unexported fields
}

type Scalable

type Scalable interface {
	GetQuery() string
	GetCurScale() int64
	// contains filtered or unexported methods
}

func NewScalable

func NewScalable(deployment v1beta1.Deployment) (Scalable, error)

type StepScalable

type StepScalable struct {
	BaseScalable
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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