migrationmaster

package
v0.0.0-...-2608902 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

This package defines the API facade for use by the migration master worker when communicating to it's own controller.

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 implements the API required for the model migration master worker.

func NewAPI

func NewAPI(
	st *state.State,
	resources *common.Resources,
	authorizer common.Authorizer,
) (*API, error)

NewAPI creates a new API server endpoint for the model migration master worker.

func (*API) Export

func (api *API) Export() (params.SerializedModel, error)

Export serializes the model associated with the API connection.

func (*API) GetMigrationStatus

func (api *API) GetMigrationStatus() (params.FullMigrationStatus, error)

GetMigrationStatus returns the details and progress of the latest model migration.

func (*API) SetPhase

func (api *API) SetPhase(args params.SetMigrationPhaseArgs) error

SetPhase sets the phase of the active model migration. The provided phase must be a valid phase value, for example QUIESCE" or "ABORT". See the core/migration package for the complete list.

func (*API) Watch

func (api *API) Watch() (params.NotifyWatchResult, error)

Watch starts watching for an active migration for the model associated with the API connection. The returned id should be used with the NotifyWatcher facade to receive events.

type Backend

type Backend interface {
	migration.StateExporter

	WatchForModelMigration() (state.NotifyWatcher, error)
	GetModelMigration() (state.ModelMigration, error)
}

Backend defines the state functionality required by the migrationmaster facade.

Jump to

Keyboard shortcuts

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