upgradestepsmachine

package
v0.0.0-...-4308112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

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 runs an upgrader worker, using the resource names defined in the supplied config.

func NewMachineWorker

func NewMachineWorker(
	upgradeCompleteLock gate.Lock,
	agent agent.Agent,
	apiCaller base.APICaller,
	preUpgradeSteps upgrades.PreUpgradeStepsFunc,
	performUpgradeSteps upgrades.UpgradeStepsFunc,
	statusSetter upgradesteps.StatusSetter,
	logger logger.Logger,
	clock clock.Clock,
) worker.Worker

NewMachineWorker returns a new instance of the machineWorker. It will run any required steps to upgrade a machine to the currently running Juju version.

Types

type ManifoldConfig

type ManifoldConfig struct {
	AgentName            string
	APICallerName        string
	UpgradeStepsGateName string
	PreUpgradeSteps      upgrades.PreUpgradeStepsFunc
	UpgradeSteps         upgrades.UpgradeStepsFunc
	NewAgentStatusSetter func(context.Context, base.APICaller) (upgradesteps.StatusSetter, error)
	Logger               logger.Logger
	Clock                clock.Clock
}

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

func (ManifoldConfig) Validate

func (c ManifoldConfig) Validate() error

Validate checks that the config is valid.

type PreUpgradeStepsFunc

type PreUpgradeStepsFunc = upgrades.PreUpgradeStepsFunc

type StatusSetter

type StatusSetter interface {
	SetStatus(ctx context.Context, setableStatus status.Status, info string, data map[string]any) error
}

StatusSetter defines the single method required to set an agent's status.

type UpgradeStepsFunc

type UpgradeStepsFunc = upgrades.UpgradeStepsFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL