autoscaler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages a set of Scaler instances.

func NewManager

func NewManager(l log.Logger, e *etcdv3.Client) *Manager

NewManager returns an Autoscale Manager

func (*Manager) Run

func (m *Manager) Run()

Run starts processing of the autoscale manager

func (*Manager) Stop

func (m *Manager) Stop()

Stop the manager and its scaler cycles.

type Registry

type Registry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Registry is a map type that can be safely shared between goroutines that require read/write access to a map.

func (*Registry) Delete

func (r *Registry) Delete(key string)

Delete deletes the item with the given name from the registry

func (*Registry) Get

func (r *Registry) Get(key string) (*Scaler, bool)

Get retrieves the value for a registry

func (*Registry) Iter

func (r *Registry) Iter() <-chan RegistryItem

Iter iterates over the items in a registry Each item is sent over a channel, so that we can iterate over the registry using the builtin range keyword

func (*Registry) Set

func (r *Registry) Set(key string, value *Scaler)

Set adds an item to a registry

type RegistryItem

type RegistryItem struct {
	Key   string
	Value *Scaler
}

RegistryItem contains a key/value pair item of a registry

type Scaler

type Scaler struct {
	model.Scaler
	// contains filtered or unexported fields
}

Scaler does metric polling and executes scale actions.

Jump to

Keyboard shortcuts

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