applicationscaler

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {

	// WatchScaledServices returns a watcher that sends service ids
	// that might not have enough units.
	WatchScaledServices() state.StringsWatcher

	// RescaleService ensures that the named service has at least its
	// configured minimum unit count.
	RescaleService(name string) error
}

Backend exposes functionality required by Facade.

type Facade

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

Facade allows model-manager clients to watch and rescale services.

func NewAPI

func NewAPI(st *state.State, res facade.Resources, auth facade.Authorizer) (*Facade, error)

NewAPI provides the required signature for facade registration.

func NewFacade

func NewFacade(backend Backend, res facade.Resources, auth facade.Authorizer) (*Facade, error)

NewFacade creates a new authorized Facade.

func (*Facade) Rescale

func (facade *Facade) Rescale(args params.Entities) params.ErrorResults

Rescale causes any supplied services to be scaled up to their minimum size.

func (*Facade) Watch

func (facade *Facade) Watch() (params.StringsWatchResult, error)

Watch returns a watcher that sends the names of services whose unit count may be below their configured minimum.

Jump to

Keyboard shortcuts

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