migrationmaster

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client describes the client side API for the MigrationMaster facade (used by the migrationmaster worker).

func NewClient

func NewClient(caller base.APICaller, newWatcher NewWatcherFunc) *Client

NewClient returns a new Client based on an existing API connection.

func (*Client) Export

func (c *Client) Export() (migration.SerializedModel, error)

Export returns a serialized representation of the model associated with the API connection. The charms used by the model are also returned.

func (*Client) MigrationStatus

func (c *Client) MigrationStatus() (migration.MigrationStatus, error)

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

func (*Client) MinionReports

func (c *Client) MinionReports() (migration.MinionReports, error)

MinionReports returns details of the reports made by migration minions to the controller for the current migration phase.

func (*Client) ModelInfo

func (c *Client) ModelInfo() (migration.ModelInfo, error)

ModelInfo return basic information about the model to migrated.

func (*Client) OpenResource

func (c *Client) OpenResource(application, name string) (io.ReadCloser, error)

OpenResource downloads the named resource for an application.

func (*Client) Prechecks

func (c *Client) Prechecks() error

Prechecks verifies that the source controller and model are healthy and able to participate in a migration.

func (*Client) Reap

func (c *Client) Reap() error

Reap removes the documents for the model associated with the API connection.

func (*Client) SetPhase

func (c *Client) SetPhase(phase migration.Phase) error

SetPhase updates the phase of the currently active model migration.

func (*Client) SetStatusMessage

func (c *Client) SetStatusMessage(message string) error

SetStatusMessage sets a human readable message regarding the progress of a migration.

func (*Client) StreamModelLog

func (c *Client) StreamModelLog(start time.Time) (<-chan common.LogMessage, error)

StreamModelLog takes a starting time and returns a channel that will yield the logs on or after that time - these are the logs that need to be transferred to the target after the migration is successful.

func (*Client) Watch

func (c *Client) Watch() (watcher.NotifyWatcher, error)

Watch returns a watcher which reports when a migration is active for the model associated with the API connection.

func (*Client) WatchMinionReports

func (c *Client) WatchMinionReports() (watcher.NotifyWatcher, error)

WatchMinionReports returns a watcher which reports when a migration minion has made a report for the current migration phase.

type NewWatcherFunc

NewWatcherFunc exists to let us unit test Facade without patching.

Jump to

Keyboard shortcuts

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