Documentation ¶
Index ¶
- type API
- func (a *API) FinishUpgradeSeries(args params.UpdateSeriesArgs) (params.ErrorResults, error)
- func (a *API) MachineStatus(args params.Entities) (params.UpgradeSeriesStatusResults, error)
- func (a *API) SetMachineStatus(args params.UpgradeSeriesStatusParams) (params.ErrorResults, error)
- func (a *API) StartUnitCompletion(args params.UpgradeSeriesStartUnitCompletionParam) (params.ErrorResults, error)
- func (a *API) TargetSeries(args params.Entities) (params.StringResults, error)
- func (a *API) UnitsCompleted(args params.Entities) (params.EntitiesResults, error)
- func (a *API) UnitsPrepared(args params.Entities) (params.EntitiesResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { *common.UpgradeSeriesAPI common.LeadershipPinningAPI // contains filtered or unexported fields }
API serves methods required by the machine agent upgrade-series worker.
func NewUpgradeSeriesAPI ¶
func NewUpgradeSeriesAPI( st common.UpgradeSeriesBackend, resources facade.Resources, authorizer facade.Authorizer, leadership common.LeadershipPinningAPI, ) (*API, error)
NewUpgradeSeriesAPI creates a new instance of the API server using the dedicated state indirection.
func (*API) FinishUpgradeSeries ¶
func (a *API) FinishUpgradeSeries(args params.UpdateSeriesArgs) (params.ErrorResults, error)
FinishUpgradeSeries is the last action in the upgrade workflow and is called after all machine and unit statuses are "completed". It updates the machine series to reflect the completed upgrade, then removes the upgrade-series lock.
func (*API) MachineStatus ¶
MachineStatus gets the current upgrade-series status of a machine.
func (*API) SetMachineStatus ¶
func (a *API) SetMachineStatus(args params.UpgradeSeriesStatusParams) (params.ErrorResults, error)
SetMachineStatus sets the current upgrade-series status of a machine.
func (*API) StartUnitCompletion ¶
func (a *API) StartUnitCompletion(args params.UpgradeSeriesStartUnitCompletionParam) (params.ErrorResults, error)
StartUnitCompletion starts the upgrade series completion phase for all subordinate units of a given machine.
func (*API) TargetSeries ¶
TargetSeries returns the series that a machine has been locked for upgrading to.
func (*API) UnitsCompleted ¶
UnitsCompleted returns the units running on this machine that have completed the upgrade-series workflow and are in their normal running state.
func (*API) UnitsPrepared ¶
UnitsPrepared returns the units running on this machine that have completed their upgrade-series preparation, and are ready to be stopped and have their unit agent services converted for the target series.