Documentation ¶
Index ¶
- type Client
- func (c *Client) Export() (migration.SerializedModel, error)
- func (c *Client) MigrationStatus() (migration.MigrationStatus, error)
- func (c *Client) MinionReports() (migration.MinionReports, error)
- func (c *Client) ModelInfo() (migration.ModelInfo, error)
- func (c *Client) OpenResource(application, name string) (io.ReadCloser, error)
- func (c *Client) Prechecks() error
- func (c *Client) Reap() error
- func (c *Client) SetPhase(phase migration.Phase) error
- func (c *Client) SetStatusMessage(message string) error
- func (c *Client) StreamModelLog(start time.Time) (<-chan common.LogMessage, error)
- func (c *Client) Watch() (watcher.NotifyWatcher, error)
- func (c *Client) WatchMinionReports() (watcher.NotifyWatcher, error)
- type NewWatcherFunc
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) OpenResource ¶
func (c *Client) OpenResource(application, name string) (io.ReadCloser, error)
OpenResource downloads the named resource for an application.
func (*Client) Prechecks ¶
Prechecks verifies that the source controller and model are healthy and able to participate in a migration.
func (*Client) SetStatusMessage ¶
SetStatusMessage sets a human readable message regarding the progress of a migration.
func (*Client) StreamModelLog ¶
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 ¶
type NewWatcherFunc func(base.APICaller, params.NotifyWatchResult) watcher.NotifyWatcher
NewWatcherFunc exists to let us unit test Facade without patching.