Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency.Manifold that will run a Worker as configured.
Types ¶
type Config ¶
type Config struct { // Facade holds the API facade used by this worker for getting, // setting and watching the model's environ version. Facade Facade // GateUnlocker holds a gate.Unlocker that the worker must call // after the model has been successfully upgraded. GateUnlocker gate.Unlocker // ModelTag holds the tag of the model to which this worker is // scoped. ModelTag names.ModelTag }
Config holds the configuration and dependencies for a worker.
type Facade ¶
type Facade interface {
SetModelStatus(context.Context, names.ModelTag, status.Status, string, map[string]interface{}) error
}
Facade exposes capabilities required by the worker.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string GateName string ModelTag names.ModelTag NewFacade func(base.APICaller) (Facade, error) NewWorker func(Config) (worker.Worker, error) }
ManifoldConfig describes how to configure and construct a Worker, and what registered resources it may depend upon.
Click to show internal directories.
Click to hide internal directories.