Documentation ¶
Overview ¶
Package upgrader is a generated GoMock package.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type ControllerConfigGetter
- type MockModelAgentService
- func (m *MockModelAgentService) EXPECT() *MockModelAgentServiceMockRecorder
- func (m *MockModelAgentService) GetMachineTargetAgentVersion(arg0 context.Context, arg1 machine.Name) (version.Number, error)
- func (m *MockModelAgentService) GetModelTargetAgentVersion(arg0 context.Context) (version.Number, error)
- func (m *MockModelAgentService) GetUnitTargetAgentVersion(arg0 context.Context, arg1 string) (version.Number, error)
- func (m *MockModelAgentService) WatchMachineTargetAgentVersion(arg0 context.Context, arg1 machine.Name) (watcher.Watcher[struct{}], error)
- func (m *MockModelAgentService) WatchModelTargetAgentVersion(arg0 context.Context) (watcher.Watcher[struct{}], error)
- func (m *MockModelAgentService) WatchUnitTargetAgentVersion(arg0 context.Context, arg1 string) (watcher.Watcher[struct{}], error)
- type MockModelAgentServiceGetMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) Do(f func(context.Context, machine.Name) (version.Number, error)) *MockModelAgentServiceGetMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) DoAndReturn(f func(context.Context, machine.Name) (version.Number, error)) *MockModelAgentServiceGetMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetMachineTargetAgentVersionCall
- type MockModelAgentServiceGetModelTargetAgentVersionCall
- func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) Do(f func(context.Context) (version.Number, error)) *MockModelAgentServiceGetModelTargetAgentVersionCall
- func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) DoAndReturn(f func(context.Context) (version.Number, error)) *MockModelAgentServiceGetModelTargetAgentVersionCall
- func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetModelTargetAgentVersionCall
- type MockModelAgentServiceGetUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) Do(f func(context.Context, string) (version.Number, error)) *MockModelAgentServiceGetUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) DoAndReturn(f func(context.Context, string) (version.Number, error)) *MockModelAgentServiceGetUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetUnitTargetAgentVersionCall
- type MockModelAgentServiceMockRecorder
- func (mr *MockModelAgentServiceMockRecorder) GetMachineTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceGetMachineTargetAgentVersionCall
- func (mr *MockModelAgentServiceMockRecorder) GetModelTargetAgentVersion(arg0 any) *MockModelAgentServiceGetModelTargetAgentVersionCall
- func (mr *MockModelAgentServiceMockRecorder) GetUnitTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceGetUnitTargetAgentVersionCall
- func (mr *MockModelAgentServiceMockRecorder) WatchMachineTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
- func (mr *MockModelAgentServiceMockRecorder) WatchModelTargetAgentVersion(arg0 any) *MockModelAgentServiceWatchModelTargetAgentVersionCall
- func (mr *MockModelAgentServiceMockRecorder) WatchUnitTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
- type MockModelAgentServiceWatchMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) Do(f func(context.Context, machine.Name) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) DoAndReturn(f func(context.Context, machine.Name) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
- type MockModelAgentServiceWatchModelTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchModelTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchModelTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchModelTargetAgentVersionCall
- type MockModelAgentServiceWatchUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) Do(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) DoAndReturn(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
- func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
- type ModelAgentService
- type UnitUpgraderAPI
- func (u *UnitUpgraderAPI) DesiredVersion(ctx context.Context, args params.Entities) (params.VersionResults, error)
- func (u *UnitUpgraderAPI) Tools(ctx context.Context, args params.Entities) (params.ToolsResults, error)
- func (u *UnitUpgraderAPI) WatchAPIVersion(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error)
- type Upgrader
- type UpgraderAPI
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 ControllerConfigGetter ¶
type ControllerConfigGetter interface {
ControllerConfig(context.Context) (controller.Config, error)
}
ControllerConfigGetter defines a method for getting the controller config.
type MockModelAgentService ¶
type MockModelAgentService struct {
// contains filtered or unexported fields
}
MockModelAgentService is a mock of ModelAgentService interface.
func NewMockModelAgentService ¶
func NewMockModelAgentService(ctrl *gomock.Controller) *MockModelAgentService
NewMockModelAgentService creates a new mock instance.
func (*MockModelAgentService) EXPECT ¶
func (m *MockModelAgentService) EXPECT() *MockModelAgentServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockModelAgentService) GetMachineTargetAgentVersion ¶
func (m *MockModelAgentService) GetMachineTargetAgentVersion(arg0 context.Context, arg1 machine.Name) (version.Number, error)
GetMachineTargetAgentVersion mocks base method.
func (*MockModelAgentService) GetModelTargetAgentVersion ¶
func (m *MockModelAgentService) GetModelTargetAgentVersion(arg0 context.Context) (version.Number, error)
GetModelTargetAgentVersion mocks base method.
func (*MockModelAgentService) GetUnitTargetAgentVersion ¶
func (m *MockModelAgentService) GetUnitTargetAgentVersion(arg0 context.Context, arg1 string) (version.Number, error)
GetUnitTargetAgentVersion mocks base method.
func (*MockModelAgentService) WatchMachineTargetAgentVersion ¶
func (m *MockModelAgentService) WatchMachineTargetAgentVersion(arg0 context.Context, arg1 machine.Name) (watcher.Watcher[struct{}], error)
WatchMachineTargetAgentVersion mocks base method.
func (*MockModelAgentService) WatchModelTargetAgentVersion ¶
func (m *MockModelAgentService) WatchModelTargetAgentVersion(arg0 context.Context) (watcher.Watcher[struct{}], error)
WatchModelTargetAgentVersion mocks base method.
func (*MockModelAgentService) WatchUnitTargetAgentVersion ¶
func (m *MockModelAgentService) WatchUnitTargetAgentVersion(arg0 context.Context, arg1 string) (watcher.Watcher[struct{}], error)
WatchUnitTargetAgentVersion mocks base method.
type MockModelAgentServiceGetMachineTargetAgentVersionCall ¶
MockModelAgentServiceGetMachineTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceGetMachineTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) Do(f func(context.Context, machine.Name) (version.Number, error)) *MockModelAgentServiceGetMachineTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceGetMachineTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) DoAndReturn(f func(context.Context, machine.Name) (version.Number, error)) *MockModelAgentServiceGetMachineTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceGetMachineTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceGetMachineTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetMachineTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type MockModelAgentServiceGetModelTargetAgentVersionCall ¶
MockModelAgentServiceGetModelTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceGetModelTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) Do(f func(context.Context) (version.Number, error)) *MockModelAgentServiceGetModelTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceGetModelTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) DoAndReturn(f func(context.Context) (version.Number, error)) *MockModelAgentServiceGetModelTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceGetModelTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceGetModelTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetModelTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type MockModelAgentServiceGetUnitTargetAgentVersionCall ¶
MockModelAgentServiceGetUnitTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceGetUnitTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) Do(f func(context.Context, string) (version.Number, error)) *MockModelAgentServiceGetUnitTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceGetUnitTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) DoAndReturn(f func(context.Context, string) (version.Number, error)) *MockModelAgentServiceGetUnitTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceGetUnitTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceGetUnitTargetAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentServiceGetUnitTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type MockModelAgentServiceMockRecorder ¶
type MockModelAgentServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockModelAgentServiceMockRecorder is the mock recorder for MockModelAgentService.
func (*MockModelAgentServiceMockRecorder) GetMachineTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) GetMachineTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceGetMachineTargetAgentVersionCall
GetMachineTargetAgentVersion indicates an expected call of GetMachineTargetAgentVersion.
func (*MockModelAgentServiceMockRecorder) GetModelTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) GetModelTargetAgentVersion(arg0 any) *MockModelAgentServiceGetModelTargetAgentVersionCall
GetModelTargetAgentVersion indicates an expected call of GetModelTargetAgentVersion.
func (*MockModelAgentServiceMockRecorder) GetUnitTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) GetUnitTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceGetUnitTargetAgentVersionCall
GetUnitTargetAgentVersion indicates an expected call of GetUnitTargetAgentVersion.
func (*MockModelAgentServiceMockRecorder) WatchMachineTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) WatchMachineTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
WatchMachineTargetAgentVersion indicates an expected call of WatchMachineTargetAgentVersion.
func (*MockModelAgentServiceMockRecorder) WatchModelTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) WatchModelTargetAgentVersion(arg0 any) *MockModelAgentServiceWatchModelTargetAgentVersionCall
WatchModelTargetAgentVersion indicates an expected call of WatchModelTargetAgentVersion.
func (*MockModelAgentServiceMockRecorder) WatchUnitTargetAgentVersion ¶
func (mr *MockModelAgentServiceMockRecorder) WatchUnitTargetAgentVersion(arg0, arg1 any) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
WatchUnitTargetAgentVersion indicates an expected call of WatchUnitTargetAgentVersion.
type MockModelAgentServiceWatchMachineTargetAgentVersionCall ¶
MockModelAgentServiceWatchMachineTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceWatchMachineTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) Do(f func(context.Context, machine.Name) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceWatchMachineTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) DoAndReturn(f func(context.Context, machine.Name) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceWatchMachineTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceWatchMachineTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchMachineTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type MockModelAgentServiceWatchModelTargetAgentVersionCall ¶
MockModelAgentServiceWatchModelTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceWatchModelTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchModelTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceWatchModelTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchModelTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceWatchModelTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceWatchModelTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchModelTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type MockModelAgentServiceWatchUnitTargetAgentVersionCall ¶
MockModelAgentServiceWatchUnitTargetAgentVersionCall wrap *gomock.Call
func (*MockModelAgentServiceWatchUnitTargetAgentVersionCall) Do ¶
func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) Do(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
Do rewrite *gomock.Call.Do
func (*MockModelAgentServiceWatchUnitTargetAgentVersionCall) DoAndReturn ¶
func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) DoAndReturn(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModelAgentServiceWatchUnitTargetAgentVersionCall) Return ¶
func (c *MockModelAgentServiceWatchUnitTargetAgentVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockModelAgentServiceWatchUnitTargetAgentVersionCall
Return rewrite *gomock.Call.Return
type ModelAgentService ¶
type ModelAgentService interface { // GetMachineTargetAgentVersion reports the target agent version that should // be being run on the provided machine identified by name. The following // errors are possible: // - [github.com/juju/juju/domain/machine/errors.MachineNotFound] // - [github.com/juju/juju/domain/model/errors.NotFound] GetMachineTargetAgentVersion(context.Context, machine.Name) (version.Number, error) // GetModelTargetAgentVersion returns the target agent version for the // entire model. The following errors can be returned: // - [github.com/juju/juju/domain/model/errors.NotFound] - When the model does // not exist. GetModelTargetAgentVersion(context.Context) (version.Number, error) // GetUnitTargetAgentVersion reports the target agent version that should be // being run on the provided unit identified by name. The following errors // are possible: // - [github.com/juju/juju/domain/application/errors.UnitNotFound] - When // the unit in question does not exist. // - [github.com/juju/juju/domain/model/errors.NotFound] - When the model // the unit belongs to no longer exists. GetUnitTargetAgentVersion(context.Context, string) (version.Number, error) // WatchMachineTargetAgentVersion is responsible for watching the target agent // version for machine and reporting when there has been a change via a // [watcher.NotifyWatcher]. The following errors can be expected: // - [machineerrors.NotFound] - When no machine exists for the provided name. // - [modelerrors.NotFound] - When the model of the machine no longer exists. WatchMachineTargetAgentVersion(ctx context.Context, machineName machine.Name) (watcher.NotifyWatcher, error) // WatchModelTargetAgentVersion is responsible for watching the target agent // version of this model and reporting when a change has happened in the // version. WatchModelTargetAgentVersion(ctx context.Context) (watcher.NotifyWatcher, error) // WatchUnitTargetAgentVersion is responsible for watching the target agent // version for unit and reporting when there has been a change via a // [watcher.NotifyWatcher]. The following errors can be expected: // - [applicationerrors.UnitNotFound] - When no unit exists for the provided name. // - [modelerrors.NotFound] - When the model of the unit no longer exists. WatchUnitTargetAgentVersion(ctx context.Context, unitName string) (watcher.NotifyWatcher, error) }
ModelAgentService provides access to the Juju agent version for the model.
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.ModelContext, modelAgentService ModelAgentService, watcherRegistry facade.WatcherRegistry, ) (*UnitUpgraderAPI, error)
NewUnitUpgraderAPI creates a new server-side UnitUpgraderAPI facade.
func (*UnitUpgraderAPI) DesiredVersion ¶
func (u *UnitUpgraderAPI) DesiredVersion(ctx context.Context, 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 ¶
func (u *UnitUpgraderAPI) Tools(ctx context.Context, args params.Entities) (params.ToolsResults, error)
Tools finds the tools necessary for the given agents.
func (*UnitUpgraderAPI) WatchAPIVersion ¶
func (u *UnitUpgraderAPI) WatchAPIVersion(ctx context.Context, 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 the unit agent to.
type Upgrader ¶
type Upgrader interface { WatchAPIVersion(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error) DesiredVersion(ctx context.Context, args params.Entities) (params.VersionResults, error) Tools(ctx context.Context, args params.Entities) (params.ToolsResults, error) SetTools(ctx context.Context, 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( controllerConfigGetter ControllerConfigGetter, ctrlSt *state.State, st *state.State, authorizer facade.Authorizer, logger corelogger.Logger, cloudService common.CloudService, credentialService common.CredentialService, modelConfigService common.ModelConfigService, modelAgentService ModelAgentService, controllerStore objectstore.ObjectStore, watcherRegistry facade.WatcherRegistry, ) (*UpgraderAPI, error)
NewUpgraderAPI creates a new server-side UpgraderAPI facade.
func (*UpgraderAPI) DesiredVersion ¶
func (u *UpgraderAPI) DesiredVersion(ctx context.Context, 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(ctx context.Context, 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 an application, machine, model or unit to.