Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API makes calls to the ApplicationScaler facade.

func NewAPI

func NewAPI(caller base.APICaller, newWatcher NewWatcherFunc) *API

NewAPI returns a new API using the supplied caller.

func (*API) Rescale

func (api *API) Rescale(applications []string) error

Rescale requests that all supplied application names be rescaled to their minimum configured sizes. It returns the first error it encounters.

func (*API) Watch

func (api *API) Watch() (watcher.StringsWatcher, error)

Watch returns a StringsWatcher that delivers the names of applications that may need to be rescaled.

type NewWatcherFunc

NewWatcherFunc exists to let us test Watch properly.

Source Files