Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type ControllerConfigService
- type InstancePollerAPI
- func (a *InstancePollerAPI) AreManuallyProvisioned(ctx context.Context, args params.Entities) (params.BoolResults, error)
- func (a *InstancePollerAPI) InstanceStatus(ctx context.Context, args params.Entities) (params.StatusResults, error)
- func (a *InstancePollerAPI) SetInstanceStatus(ctx context.Context, args params.SetStatus) (params.ErrorResults, error)
- func (a *InstancePollerAPI) SetProviderNetworkConfig(ctx context.Context, req params.SetProviderNetworkConfig) (params.SetProviderNetworkConfigResults, error)
- type MachineService
- type NetworkService
- type StateInterface
- type StateMachine
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 ControllerConfigService ¶
type ControllerConfigService interface { // ControllerConfig returns the config values for the controller. ControllerConfig(context.Context) (controller.Config, error) }
ControllerConfigService is an interface that provides access to the controller configuration.
type InstancePollerAPI ¶
type InstancePollerAPI struct { *common.LifeGetter *commonmodel.ModelMachinesWatcher *common.InstanceIdGetter *common.StatusGetter // contains filtered or unexported fields }
InstancePollerAPI provides access to the InstancePoller API facade.
func NewInstancePollerAPI ¶
func NewInstancePollerAPI( st *state.State, networkService NetworkService, machineService MachineService, m *state.Model, resources facade.Resources, authorizer facade.Authorizer, controllerConfigService ControllerConfigService, clock clock.Clock, logger corelogger.Logger, ) (*InstancePollerAPI, error)
NewInstancePollerAPI creates a new server-side InstancePoller API facade.
func (*InstancePollerAPI) AreManuallyProvisioned ¶
func (a *InstancePollerAPI) AreManuallyProvisioned(ctx context.Context, args params.Entities) (params.BoolResults, error)
AreManuallyProvisioned returns whether each given entity is manually provisioned or not. Only machine tags are accepted.
func (*InstancePollerAPI) InstanceStatus ¶
func (a *InstancePollerAPI) InstanceStatus(ctx context.Context, args params.Entities) (params.StatusResults, error)
InstanceStatus returns the instance status for each given entity. Only machine tags are accepted.
func (*InstancePollerAPI) SetInstanceStatus ¶
func (a *InstancePollerAPI) SetInstanceStatus(ctx context.Context, args params.SetStatus) (params.ErrorResults, error)
SetInstanceStatus updates the instance status for each given entity. Only machine tags are accepted.
func (*InstancePollerAPI) SetProviderNetworkConfig ¶
func (a *InstancePollerAPI) SetProviderNetworkConfig( ctx context.Context, req params.SetProviderNetworkConfig, ) (params.SetProviderNetworkConfigResults, error)
SetProviderNetworkConfig updates the provider addresses for one or more machines.
What's more, if the client request includes provider-specific IDs (e.g. network, subnet or address IDs), this method will also iterate any present link layer devices (and their addresses) and merge in any missing provider-specific information.
type MachineService ¶
type MachineService interface { // EnsureDeadMachine sets the provided machine's life status to Dead. // No error is returned if the provided machine doesn't exist, just nothing // gets updated. EnsureDeadMachine(ctx context.Context, machineName machine.Name) error // GetMachineUUID returns the UUID of a machine identified by its name. GetMachineUUID(ctx context.Context, name machine.Name) (string, error) // InstanceID returns the cloud specific instance id for this machine. InstanceID(ctx context.Context, mUUID string) (instance.Id, error) // InstanceIDAndName returns the cloud specific instance ID and display name for // this machine. InstanceIDAndName(ctx context.Context, machineUUID string) (instance.Id, string, error) // HardwareCharacteristics returns the hardware characteristics of the // specified machine. HardwareCharacteristics(ctx context.Context, machineUUID string) (*instance.HardwareCharacteristics, error) }
MachineService defines the methods that the facade assumes from the Machine service.
type NetworkService ¶
type NetworkService interface { // GetAllSpaces returns all spaces for the model. GetAllSpaces(ctx context.Context) (network.SpaceInfos, error) }
NetworkService is the interface that is used to interact with the network spaces/subnets.
type StateInterface ¶
type StateInterface interface { state.ModelMachinesWatcher state.EntityFinder Machine(id string) (StateMachine, error) // ApplyOperation applies a given ModelOperation to the model. ApplyOperation(state.ModelOperation) error }
type StateMachine ¶
type StateMachine interface { state.Entity networkingcommon.LinkLayerMachine ProviderAddresses() network.SpaceAddresses SetProviderAddresses(controller.Config, ...network.SpaceAddress) error InstanceStatus() (status.StatusInfo, error) SetInstanceStatus(status.StatusInfo) error SetStatus(status.StatusInfo) error String() string Refresh() error Life() state.Life Status() (status.StatusInfo, error) IsManual() (bool, error) }
StateMachine represents a machine from state package.