juju: github.com/juju/juju/worker/caasenvironupgrader Index | Files

package caasenvironupgrader

import "github.com/juju/juju/worker/caasenvironupgrader"

Index

Package Files

manifold.go shim.go worker.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold that will run a Worker as configured.

func NewWorker Uses

func NewWorker(config Config) (worker.Worker, error)

NewWorker returns a worker that unlocks the model upgrade gate.

type Config Uses

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.

func (Config) Validate Uses

func (config Config) Validate() error

Validate returns an error if the config cannot be expected to drive a functional worker.

type Facade Uses

type Facade interface {
    SetModelStatus(names.ModelTag, status.Status, string, map[string]interface{}) error
}

Facade exposes capabilities required by the worker.

func NewFacade Uses

func NewFacade(apiCaller base.APICaller) (Facade, error)

type ManifoldConfig Uses

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.

Package caasenvironupgrader imports 9 packages (graph) and is imported by 2 packages. Updated 2019-12-11. Refresh now. Tools for package owners.