util

package
v3.6.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationFunc

type AnnotationFunc func(currentReplicas int32, annotations map[string]string)

type ScaleAnnotater

type ScaleAnnotater struct {
	ChangeAnnotations AnnotationFunc
	// contains filtered or unexported fields
}

func (*ScaleAnnotater) GetObjectWithScale

func (c *ScaleAnnotater) GetObjectWithScale(namespace string, ref unidlingapi.CrossGroupObjectReference) (runtime.Object, *kextapi.Scale, error)

getObjectWithScale either fetches a known type of object and constructs a Scale from that, or uses the scale subresource to fetch a Scale by itself.

func (*ScaleAnnotater) UpdateObjectScale

func (c *ScaleAnnotater) UpdateObjectScale(updater ScaleUpdater, namespace string, ref unidlingapi.CrossGroupObjectReference, obj runtime.Object, scale *kextapi.Scale) error

updateObjectScale updates the scale of an object and removes unidling annotations for objects of a know type. For objects of an unknown type, it scales the object using the scale subresource (and does not change annotations).

type ScaleUpdater added in v1.5.0

type ScaleUpdater interface {
	Update(*ScaleAnnotater, runtime.Object, *kextapi.Scale) error
}

ScaleUpdater implements a method "Update" that knows how to update a given object

func NewScaleUpdater added in v1.5.0

Jump to

Keyboard shortcuts

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