Documentation
¶
Overview ¶
Package migrationmaster defines the API facade for use by the migration master worker when communicating with its own controller.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type API
- func (api *API) Export() (params.SerializedModel, error)
- func (api *API) MigrationStatus() (params.MasterMigrationStatus, error)
- func (api *API) MinionReportTimeout() (params.StringResult, error)
- func (api *API) MinionReports() (params.MinionReports, error)
- func (api *API) ModelInfo() (params.MigrationModelInfo, error)
- func (api *API) Prechecks(arg params.PrechecksArgs) error
- func (api *API) ProcessRelations(args params.ProcessRelations) error
- func (api *API) Reap() error
- func (api *API) SetPhase(args params.SetMigrationPhaseArgs) error
- func (api *API) SetStatusMessage(args params.SetMigrationStatusMessageArgs) error
- func (api *API) SourceControllerInfo() (params.MigrationSourceInfo, error)
- func (api *API) Watch() params.NotifyWatchResult
- func (api *API) WatchMinionReports() params.NotifyWatchResult
- type Backend
- type ControllerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements the API required for the model migration master worker.
func NewAPI ¶
func NewAPI( controllerState ControllerState, backend Backend, precheckBackend migration.PrecheckBackend, pool migration.Pool, resources facade.Resources, authorizer facade.Authorizer, presence facade.Presence, environscloudspecGetter func(names.ModelTag) (environscloudspec.CloudSpec, error), leadership leadership.Reader, ) (*API, error)
NewAPI creates a new API server endpoint for the model migration master worker.
func (*API) Export ¶
func (api *API) Export() (params.SerializedModel, error)
Export serializes the model associated with the API connection.
func (*API) MigrationStatus ¶
func (api *API) MigrationStatus() (params.MasterMigrationStatus, error)
MigrationStatus returns the details and progress of the latest model migration.
func (*API) MinionReportTimeout ¶
func (api *API) MinionReportTimeout() (params.StringResult, error)
MinionReportTimeout returns the configuration value for this controller that indicates how long the migration master worker should wait for minions to reported on phases of a migration.
func (*API) MinionReports ¶
func (api *API) MinionReports() (params.MinionReports, error)
MinionReports returns details of the reports made by migration minions to the controller for the current migration phase.
func (*API) ModelInfo ¶
func (api *API) ModelInfo() (params.MigrationModelInfo, error)
ModelInfo returns essential information about the model to be migrated.
func (*API) Prechecks ¶
func (api *API) Prechecks(arg params.PrechecksArgs) error
Prechecks performs pre-migration checks on the model and (source) controller.
func (*API) ProcessRelations ¶
func (api *API) ProcessRelations(args params.ProcessRelations) error
ProcessRelations processes any relations that need updating after an export. This should help fix any remoteApplications that have been migrated.
func (*API) SetPhase ¶
func (api *API) SetPhase(args params.SetMigrationPhaseArgs) error
SetPhase sets the phase of the active model migration. The provided phase must be a valid phase value, for example QUIESCE" or "ABORT". See the core/migration package for the complete list.
func (*API) SetStatusMessage ¶
func (api *API) SetStatusMessage(args params.SetMigrationStatusMessageArgs) error
SetStatusMessage sets a human readable status message containing information about the migration's progress. This will be shown in status output shown to the end user.
func (*API) SourceControllerInfo ¶
func (api *API) SourceControllerInfo() (params.MigrationSourceInfo, error)
SourceControllerInfo returns the details required to connect to the source controller for model migration.
func (*API) Watch ¶
func (api *API) Watch() params.NotifyWatchResult
Watch starts watching for an active migration for the model associated with the API connection. The returned id should be used with the NotifyWatcher facade to receive events.
func (*API) WatchMinionReports ¶
func (api *API) WatchMinionReports() params.NotifyWatchResult
WatchMinionReports sets up a watcher which reports when a report for a migration minion has arrived.
type Backend ¶
type Backend interface { migration.StateExporter WatchForMigration() state.NotifyWatcher LatestMigration() (state.ModelMigration, error) ModelUUID() string ModelName() (string, error) ModelOwner() (names.UserTag, error) AgentVersion() (version.Number, error) RemoveExportingModelDocs() error ControllerConfig() (controller.Config, error) AllLocalRelatedModels() ([]string, error) }
Backend defines the state functionality required by the migrationmaster facade.
type ControllerState ¶
type ControllerState interface {
APIHostPortsForClients() ([]network.SpaceHostPorts, error)
}
ControllerState defines the state functionality for controller model.