Documentation
¶
Overview ¶
Package migrationtarget defines the client side API facade for use by the migration master worker when communicating with the target controller.
Index ¶
- Variables
- type Client
- func (c *Client) Abort(ctx context.Context, modelUUID string) error
- func (c *Client) Activate(ctx context.Context, modelUUID string, ...) error
- func (c *Client) AdoptResources(ctx context.Context, modelUUID string) error
- func (c *Client) BestFacadeVersion() int
- func (c *Client) CACert(ctx context.Context) (string, error)
- func (c *Client) CheckMachines(ctx context.Context, modelUUID string) ([]error, error)
- func (c *Client) Import(ctx context.Context, bytes []byte) error
- func (c *Client) LatestLogTime(ctx context.Context, modelUUID string) (time.Time, error)
- func (c *Client) OpenLogTransferStream(ctx context.Context, modelUUID string) (base.Stream, error)
- func (c *Client) Prechecks(ctx context.Context, model coremigration.ModelInfo) error
- func (c *Client) UploadCharm(ctx context.Context, modelUUID string, curl string, charmRef string, ...) (string, error)
- func (c *Client) UploadResource(ctx context.Context, modelUUID string, res resource.Resource, r io.Reader) error
- func (c *Client) UploadTools(ctx context.Context, modelUUID string, r io.Reader, vers version.Binary) (tools.List, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
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(ctx context.Context, 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 ¶
Prechecks checks that the target controller is able to accept the model being migrated.
func (*Client) UploadCharm ¶
func (c *Client) UploadCharm(ctx context.Context, modelUUID string, curl string, charmRef string, content io.Reader) (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.