modelupgrader

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: 9 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 {
	Cloud(string) (cloud.Cloud, error)
}

type EntityWatcher

type EntityWatcher interface {
	Watch(params.Entities) (params.NotifyWatchResults, error)
}

EntityWatcher is an interface that provides a means of watching entities.

type Facade

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

func NewFacade

func NewFacade(
	backend Backend,
	pool Pool,
	providers ProviderRegistry,
	entityWatcher EntityWatcher,
	statusSetter StatusSetter,
	auth facade.Authorizer,
) (*Facade, error)

NewFacade returns a new Facade using the given Backend and Authorizer.

func NewStateFacade

func NewStateFacade(ctx facade.Context) (*Facade, error)

NewStateFacade provides the signature required for facade registration.

func (*Facade) ModelEnvironVersion

func (f *Facade) ModelEnvironVersion(args params.Entities) (params.IntResults, error)

ModelEnvironVersion returns the current version of the environ corresponding to each specified model.

func (*Facade) ModelTargetEnvironVersion

func (f *Facade) ModelTargetEnvironVersion(args params.Entities) (params.IntResults, error)

ModelTargetEnvironVersion returns the target version of the environ corresponding to each specified model. The target version is the environ provider's version.

func (*Facade) SetModelEnvironVersion

func (f *Facade) SetModelEnvironVersion(args params.SetModelEnvironVersions) (params.ErrorResults, error)

SetModelEnvironVersion sets the current version of the environ corresponding to each specified model.

func (*Facade) SetModelStatus

func (f *Facade) SetModelStatus(args params.SetStatus) (params.ErrorResults, error)

SetModelStatus sets the status of each given model.

func (*Facade) WatchModelEnvironVersion

func (f *Facade) WatchModelEnvironVersion(args params.Entities) (params.NotifyWatchResults, error)

WatchModelEnvironVersion watches for changes to the environ version of the specified models.

NOTE(axw) this is currently implemented in terms of state.Model.Watch, so the client may be notified of changes unrelated to the environ version.

type Model

type Model interface {
	CloudName() string
	EnvironVersion() int
	SetEnvironVersion(int) error
}

type Pool

type Pool interface {
	GetModel(string) (Model, func(), error)
}

func NewPool

func NewPool(pool *state.StatePool) Pool

type ProviderRegistry

type ProviderRegistry interface {
	Provider(string) (environs.EnvironProvider, error)
}

ProviderRegistry provides the subset of environs.ProviderRegistry that we require.

type StatusSetter

type StatusSetter interface {
	SetStatus(params.SetStatus) (params.ErrorResults, error)
}

StatusSetter is an interface that provides a means of setting the status of entities.

Jump to

Keyboard shortcuts

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