upgrader

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type UnitUpgraderAPI

type UnitUpgraderAPI struct {
	*common.ToolsSetter
	// contains filtered or unexported fields
}

UnitUpgraderAPI provides access to the UnitUpgrader API facade.

func NewUnitUpgraderAPI

func NewUnitUpgraderAPI(ctx facade.Context) (*UnitUpgraderAPI, error)

NewUnitUpgraderAPI creates a new server-side UnitUpgraderAPI facade.

func (*UnitUpgraderAPI) DesiredVersion

func (u *UnitUpgraderAPI) DesiredVersion(args params.Entities) (params.VersionResults, error)

DesiredVersion reports the Agent Version that we want that unit to be running. The desired version is what the unit's assigned machine is running.

func (*UnitUpgraderAPI) Tools

Tools finds the tools necessary for the given agents.

func (*UnitUpgraderAPI) WatchAPIVersion

func (u *UnitUpgraderAPI) WatchAPIVersion(args params.Entities) (params.NotifyWatchResults, error)

WatchAPIVersion starts a watcher to track if there is a new version of the API that we want to upgrade to. The watcher tracks changes to the unit's assigned machine since that's where the required agent version is stored.

type Upgrader

type Upgrader interface {
	WatchAPIVersion(args params.Entities) (params.NotifyWatchResults, error)
	DesiredVersion(args params.Entities) (params.VersionResults, error)
	Tools(args params.Entities) (params.ToolsResults, error)
	SetTools(args params.EntitiesVersion) (params.ErrorResults, error)
}

type UpgraderAPI

type UpgraderAPI struct {
	*common.ToolsGetter
	*common.ToolsSetter
	// contains filtered or unexported fields
}

UpgraderAPI provides access to the Upgrader API facade.

func NewUpgraderAPI

func NewUpgraderAPI(
	ctrlSt *state.State,
	st *state.State,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*UpgraderAPI, error)

NewUpgraderAPI creates a new server-side UpgraderAPI facade.

func (*UpgraderAPI) DesiredVersion

func (u *UpgraderAPI) DesiredVersion(args params.Entities) (params.VersionResults, error)

DesiredVersion reports the Agent Version that we want that agent to be running

func (*UpgraderAPI) WatchAPIVersion

func (u *UpgraderAPI) WatchAPIVersion(args params.Entities) (params.NotifyWatchResults, error)

WatchAPIVersion starts a watcher to track if there is a new version of the API that we want to upgrade to

Jump to

Keyboard shortcuts

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