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

package caasupgrader

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

Index

Package Files

manifold.go upgrader.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs an upgrader worker, using the resource names defined in the supplied config.

type CAASOperatorUpgrader Uses

type CAASOperatorUpgrader interface {
    Upgrade(agentTag string, v version.Number) error
}

type Config Uses

type Config struct {
    UpgraderClient              UpgraderClient
    CAASOperatorUpgrader        CAASOperatorUpgrader
    AgentTag                    names.Tag
    OrigAgentVersion            version.Number
    UpgradeStepsWaiter          gate.Waiter
    InitialUpgradeCheckComplete gate.Unlocker
}

Config contains the items the worker needs to start.

type ManifoldConfig Uses

type ManifoldConfig struct {
    AgentName            string
    APICallerName        string
    UpgradeStepsGateName string
    UpgradeCheckGateName string
    PreviousAgentVersion version.Number
}

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type Upgrader Uses

type Upgrader struct {
    // contains filtered or unexported fields
}

Upgrader represents a worker that watches the state for upgrade requests for a given CAAS agent.

func NewUpgrader Uses

func NewUpgrader(config Config) (*Upgrader, error)

NewUpgrader returns a new upgrader worker. It watches changes to the current version of a CAAS agent. If an upgrade is needed, the worker updates the docker image version for the specified agent. TODO(caas) - support HA controllers

func (*Upgrader) Kill Uses

func (u *Upgrader) Kill()

Kill implements worker.Worker.Kill.

func (*Upgrader) Wait Uses

func (u *Upgrader) Wait() error

Wait implements worker.Worker.Wait.

type UpgraderClient Uses

type UpgraderClient interface {
    DesiredVersion(tag string) (version.Number, error)
    SetVersion(tag string, v version.Binary) error
    WatchAPIVersion(agentTag string) (watcher.NotifyWatcher, error)
}

UpgraderClient provides the facade methods used by the worker.

Package caasupgrader imports 19 packages (graph) and is imported by 4 packages. Updated 2019-09-27. Refresh now. Tools for package owners.