Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMinUnitsWorker

func NewMinUnitsWorker(st *state.State) worker.Worker

NewMinUnitsWorker returns a Worker that runs service.EnsureMinUnits() if the number of alive units belonging to a service decreases, or if the minimum required number of units for a service is increased.

Types

type MinUnitsWorker

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

MinUnitsWorker ensures the minimum number of units for services is respected.

func (*MinUnitsWorker) Handle

func (mu *MinUnitsWorker) Handle(serviceNames []string) error

func (*MinUnitsWorker) SetUp

func (mu *MinUnitsWorker) SetUp() (watcher.StringsWatcher, error)

func (*MinUnitsWorker) TearDown

func (mu *MinUnitsWorker) TearDown() error