migrationflag

package
v0.0.0-...-298751d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type Backend

type Backend interface {
	ModelUUID() string
	MigrationPhase() (migration.Phase, error)
	WatchMigrationPhase() state.NotifyWatcher
}

Backend exposes information about any current model migrations.

type Facade

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

Facade lets clients watch and get models' migration phases.

func New

func New(backend Backend, resources facade.Resources, auth facade.Authorizer) (*Facade, error)

New creates a Facade backed by backend and resources. If auth doesn't identity the client as a machine agent or a unit agent, it will return apiservererrors.ErrPerm.

func (*Facade) Phase

func (facade *Facade) Phase(entities params.Entities) params.PhaseResults

Phase returns the current migration phase or an error for every supplied entity.

func (*Facade) Watch

func (facade *Facade) Watch(entities params.Entities) params.NotifyWatchResults

Watch returns an id for use with the NotifyWatcher facade, or an error, for every supplied entity.

Jump to

Keyboard shortcuts

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