migrationmaster

package
v0.0.0-...-56cb166 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 describes the client side API for the MigrationMaster facade (used by the migrationmaster worker).

func NewClient

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

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

func (*Client) Export

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(ctx context.Context) (migration.MigrationStatus, error)

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

func (*Client) MinionReportTimeout

func (c *Client) MinionReportTimeout(ctx context.Context) (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(ctx context.Context) (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(ctx context.Context) (migration.ModelInfo, error)

ModelInfo return basic information about the model to migrated.

func (*Client) OpenResource

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

OpenResource downloads the named resource for an application.

func (*Client) Prechecks

func (c *Client) Prechecks(ctx context.Context) 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(ctx context.Context, 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(ctx context.Context) error

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

func (*Client) SetPhase

func (c *Client) SetPhase(ctx context.Context, phase migration.Phase) error

SetPhase updates the phase of the currently active model migration.

func (*Client) SetStatusMessage

func (c *Client) SetStatusMessage(ctx context.Context, message string) error

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

func (*Client) SourceControllerInfo

func (c *Client) SourceControllerInfo(ctx context.Context) (migration.SourceControllerInfo, []string, error)

SourceControllerInfo returns connection information about the source controller and uuids of any other hosted models involved in cross model relations.

func (*Client) StreamModelLog

func (c *Client) StreamModelLog(ctx context.Context, 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(ctx context.Context) (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(ctx context.Context) (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.

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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