Documentation
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrChanged = errors.New("migration flag value changed")
ErrChanged indicates that a Worker has stopped because its Check result is no longer valid.
Functions ¶
func IsTerminal ¶
IsTerminal returns true when the given phase means a migration has finished (successfully or otherwise).
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold packages a Worker for use in a dependency.Engine.
Types ¶
type Facade ¶
type Facade interface { Watch(uuid string) (watcher.NotifyWatcher, error) Phase(uuid string) (migration.Phase, error) }
Facade exposes controller functionality required by a Worker.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string Check Predicate NewFacade func(base.APICaller) (Facade, error) NewWorker func(Config) (worker.Worker, error) }
ManifoldConfig holds the dependencies and configuration for a Worker manifold.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker implements worker.Worker and util.Flag, and exits with ErrChanged whenever the result of its configured Check of the Model's migration phase changes.