Documentation
¶
Overview ¶
Package migrationtarget defines the client side API facade for use by the migration master worker when communicating with the target controller.
Index ¶
- type Client
- func (c *Client) Abort(modelUUID string) error
- func (c *Client) Activate(modelUUID string, sourceInfo coremigration.SourceControllerInfo, ...) error
- func (c *Client) AdoptResources(modelUUID string) error
- func (c *Client) BestFacadeVersion() int
- func (c *Client) CACert() (string, error)
- func (c *Client) CheckMachines(modelUUID string) ([]error, error)
- func (c *Client) Import(bytes []byte) error
- func (c *Client) LatestLogTime(modelUUID string) (time.Time, error)
- func (c *Client) OpenLogTransferStream(modelUUID string) (base.Stream, error)
- func (c *Client) Prechecks(model coremigration.ModelInfo) error
- func (c *Client) SetPlaceholderResource(modelUUID string, res resources.Resource) error
- func (c *Client) SetUnitResource(modelUUID, unit string, res resources.Resource) error
- func (c *Client) UploadCharm(modelUUID string, curl string, charmRef string, content io.ReadSeeker) (string, error)
- func (c *Client) UploadResource(modelUUID string, res resources.Resource, r io.ReadSeeker) error
- func (c *Client) UploadTools(modelUUID string, r io.ReadSeeker, vers version.Binary) (tools.List, error)
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 is the client-side API for the MigrationTarget facade. It is used by the migrationmaster worker when talking to the target controller during a migration.
func (*Client) Activate ¶
func (c *Client) Activate(modelUUID string, sourceInfo coremigration.SourceControllerInfo, relatedModels []string) error
Activate marks a migrated model as being ready to use.
func (*Client) AdoptResources ¶
AdoptResources asks the cloud provider to update the controller tags for a model's resources. This prevents the resources from being destroyed if the source controller is destroyed after the model is migrated away.
func (*Client) BestFacadeVersion ¶
BestFacadeVersion returns the best supported facade version on the target controller.
func (*Client) CheckMachines ¶
CheckMachines compares the machines in state with the ones reported by the provider and reports any discrepancies.
func (*Client) LatestLogTime ¶
LatestLogTime asks the target controller for the time of the latest log record it has seen. This can be used to make the log transfer restartable.
func (*Client) OpenLogTransferStream ¶
OpenLogTransferStream connects to the migration logtransfer endpoint on the target controller and returns a stream that JSON logs records can be fed into. The objects written should be params.LogRecords.
func (*Client) Prechecks ¶
func (c *Client) Prechecks(model coremigration.ModelInfo) error
Prechecks checks that the target controller is able to accept the model being migrated.
func (*Client) SetPlaceholderResource ¶
SetPlaceholderResource sets the metadata for a placeholder resource.
func (*Client) SetUnitResource ¶
SetUnitResource sets the metadata for a particular unit resource.
func (*Client) UploadCharm ¶
func (c *Client) UploadCharm(modelUUID string, curl string, charmRef string, content io.ReadSeeker) (string, error)
UploadCharm sends the content to the API server using an HTTP post in order to add the charm binary to the model specified.
func (*Client) UploadResource ¶
UploadResource uploads a resource to the migration endpoint.
func (*Client) UploadTools ¶
func (c *Client) UploadTools(modelUUID string, r io.ReadSeeker, vers version.Binary) (tools.List, error)
UploadTools uploads tools at the specified location to the API server over HTTPS for the specified model.