This section is empty.


This section is empty.


This section is empty.


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) MinionReportTimeout

func (c *Client) MinionReportTimeout() (time.Duration, error)

MinionReportTimeout returns the maximum duration that the migration master worker should wait for minions to report on a migration phase.

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) ProcessRelations

func (c *Client) ProcessRelations(controllerAlias string) error

ProcessRelations runs a series of processes to ensure that the relations of a given model are correct after a migrated model.

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.

Source Files