import "github.com/juju/juju/worker/migrationminion"
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency manifold that runs the migration worker.
New returns a Worker backed by config, or an error.
type Config struct { Agent agent.Agent Facade Facade Guard fortress.Guard Clock clock.Clock APIOpen func(*api.Info, api.DialOpts) (api.Connection, error) ValidateMigration func(base.APICaller) error }
Config defines the operation of a Worker.
Validate returns an error if config cannot drive a Worker.
type Facade interface { Watch() (watcher.MigrationStatusWatcher, error) Report(migrationId string, phase migration.Phase, success bool) error }
Facade exposes controller functionality to a Worker.
type ManifoldConfig struct { AgentName string APICallerName string FortressName string Clock clock.Clock APIOpen func(*api.Info, api.DialOpts) (api.Connection, error) ValidateMigration func(base.APICaller) error NewFacade func(base.APICaller) (Facade, error) NewWorker func(Config) (worker.Worker, error) }
ManifoldConfig defines the names of the manifolds on which a Worker manifold will depend.
func (config ManifoldConfig) Validate() error
validate is called by start to check for bad configuration.
type Worker struct {
// contains filtered or unexported fields
}
Worker waits for a model migration to be active, then locks down the configured fortress and implements the migration.
Kill implements worker.Worker.
Wait implements worker.Worker.
Package migrationminion imports 16 packages (graph) and is imported by 50 packages. Updated 2019-10-02. Refresh now. Tools for package owners.