instancepoller

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstancePollerAPI

type InstancePollerAPI struct {
	*common.LifeGetter
	*common.ModelWatcher
	*common.ModelMachinesWatcher
	*common.InstanceIdGetter
	*common.StatusGetter
	// contains filtered or unexported fields
}

InstancePollerAPI provides access to the InstancePoller API facade.

func NewFacade

func NewFacade(
	st *state.State,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*InstancePollerAPI, error)

NewFacade wraps NewInstancePollerAPI for facade registration.

func NewInstancePollerAPI

func NewInstancePollerAPI(
	st *state.State,
	m *state.Model,
	resources facade.Resources,
	authorizer facade.Authorizer,
	clock clock.Clock,
) (*InstancePollerAPI, error)

NewInstancePollerAPI creates a new server-side InstancePoller API facade.

func (*InstancePollerAPI) AreManuallyProvisioned

func (a *InstancePollerAPI) AreManuallyProvisioned(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(args params.Entities) (params.StatusResults, error)

InstanceStatus returns the instance status for each given entity. Only machine tags are accepted.

func (*InstancePollerAPI) ProviderAddresses

func (a *InstancePollerAPI) ProviderAddresses(args params.Entities) (params.MachineAddressesResults, error)

ProviderAddresses returns the list of all known provider addresses for each given entity. Only machine tags are accepted.

func (*InstancePollerAPI) SetInstanceStatus

func (a *InstancePollerAPI) SetInstanceStatus(args params.SetStatus) (params.ErrorResults, error)

SetInstanceStatus updates the instance status for each given entity. Only machine tags are accepted.

func (*InstancePollerAPI) SetProviderAddresses

func (a *InstancePollerAPI) SetProviderAddresses(args params.SetMachinesAddresses) (params.ErrorResults, error)

SetProviderAddresses updates the list of known provider addresses for each given entity. Only machine tags are accepted.

func (*InstancePollerAPI) SetProviderNetworkConfig

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 InstancePollerAPIV3

type InstancePollerAPIV3 struct {
	*InstancePollerAPI
}

InstancePollerAPIV3 implements the V3 API used by the instance poller worker. Compared to V4, it lacks the SetProviderNetworkConfig method.

func NewFacadeV3

func NewFacadeV3(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*InstancePollerAPIV3, error)

NewFacadeV3 creates a new instance of the V3 InstancePoller API.

func (*InstancePollerAPIV3) SetProviderNetworkConfig

func (*InstancePollerAPIV3) SetProviderNetworkConfig(_, _ struct{})

SetProviderNetworkConfig is not available in V3.

type StateInterface

type StateInterface interface {
	state.ModelAccessor
	state.ModelMachinesWatcher
	state.EntityFinder
	network.SpaceLookup

	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

	InstanceId() (instance.Id, error)
	ProviderAddresses() network.SpaceAddresses
	SetProviderAddresses(...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.

Jump to

Keyboard shortcuts

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