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
Click to show internal directories.
Click to hide internal directories.