migrationminion

package
v0.0.0-...-e653fdf Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

Package migrationminion defines the API facade for use by the migration minion worker to monitor the progress of, and interact with, model migrations.

The migration minion runs inside every non-controller agent.

Index

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(
	backend Backend,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*API, error)

NewAPI creates a new API server endpoint for the model migration master worker.

func (*API) Report

func (api *API) Report(info params.MinionReport) error

Report allows a migration minion to submit whether it succeeded or failed for a specific migration phase.

func (*API) Watch

func (api *API) Watch() (params.NotifyWatchResult, error)

Watch starts watching for status updates for a migration attempt for the model. It will report when a migration starts and when its status changes (including when it finishes). An initial event will be fired if there has ever been a migration attempt for the model.

The MigrationStatusWatcher facade must be used to receive events from the watcher.

type Backend

type Backend interface {
	WatchMigrationStatus() state.NotifyWatcher
	Migration(string) (state.ModelMigration, error)
}

Backend defines the state functionality required by the MigrationMinion facade.

Jump to

Keyboard shortcuts

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