autoscaler

package
v0.0.0-...-33ac69c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package autoscaler contains the autoscaler implementation.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGoals = errors.New("autoscaler: no goals")

ErrNoGoals indicates that no goals were specified.

Functions

This section is empty.

Types

type Autoscaler

type Autoscaler struct {
	startstopper.StartStopper
	sync.RWMutex

	Service swarm.Service
	Update  bool
	Goals   []metric.Goal

	Period                    time.Duration
	CooldownServiceCreated    time.Duration
	CooldownServiceUpdated    time.Duration
	CooldownServiceScaledUp   time.Duration
	CooldownServiceScaledDown time.Duration

	MaxReplicas uint64
	MinReplicas uint64
}

Autoscaler observes one Docker Swarm service and automatically scales it depending on defined metrics.

func New

func New(srv swarm.Service, goals []metric.Goal) (*Autoscaler, error)

New creates an autoscaler for the given service.

Jump to

Keyboard shortcuts

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