juju: github.com/juju/juju/apiserver/facades/agent/machine Index | Files

package machine

import "github.com/juju/juju/apiserver/facades/agent/machine"

The machiner package implements the API interface used by the machiner worker.

Index

Package Files

machiner.go

type MachinerAPI Uses

type MachinerAPI struct {
    *common.LifeGetter
    *common.StatusSetter
    *common.DeadEnsurer
    *common.AgentEntityWatcher
    *common.APIAddresser
    *networkingcommon.NetworkConfigAPI
    // contains filtered or unexported fields
}

MachinerAPI implements the API used by the machiner worker.

func NewMachinerAPI Uses

func NewMachinerAPI(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*MachinerAPI, error)

NewMachinerAPI creates a new instance of the Machiner API.

func (*MachinerAPI) Jobs Uses

func (api *MachinerAPI) Jobs(args params.Entities) (params.JobsResults, error)

Jobs returns the jobs assigned to the given entities.

func (*MachinerAPI) RecordAgentStartTime Uses

func (api *MachinerAPI) RecordAgentStartTime(args params.Entities) (params.ErrorResults, error)

RecordAgentStartTime updates the agent start time field in the machine doc.

func (*MachinerAPI) SetMachineAddresses Uses

func (api *MachinerAPI) SetMachineAddresses(args params.SetMachinesAddresses) (params.ErrorResults, error)

type MachinerAPIV1 Uses

type MachinerAPIV1 struct {
    *MachinerAPIV2
}

MachinerAPIV1 implements the V1 API used by the machiner worker.

func NewMachinerAPIV1 Uses

func NewMachinerAPIV1(
    st *state.State, resources facade.Resources, authorizer facade.Authorizer,
) (*MachinerAPIV1, error)

NewMachinerAPIV1 creates a new instance of the V1 Machiner API.

func (*MachinerAPIV1) RecordAgentStartTime Uses

func (api *MachinerAPIV1) RecordAgentStartTime(_, _ struct{})

RecordAgentStartTime is not available in V1.

type MachinerAPIV2 Uses

type MachinerAPIV2 struct {
    *MachinerAPIV3
}

MachinerAPIV2 implements the V2 API used by the machiner worker. It adds RecordAgentStartTime and back-fills the missing origin in NetworkConfig.

func NewMachinerAPIV2 Uses

func NewMachinerAPIV2(
    st *state.State, resources facade.Resources, authorizer facade.Authorizer,
) (*MachinerAPIV2, error)

NewMachinerAPIV2 creates a new instance of the V2 Machiner API.

func (*MachinerAPIV2) SetObservedNetworkConfig Uses

func (api *MachinerAPIV2) SetObservedNetworkConfig(args params.SetMachineNetworkConfig) error

SetObservedNetworkConfig back-fills machine origin before calling through to the networking common method of the same name. Older agents do not set the origin, so we must do it for them.

type MachinerAPIV3 Uses

type MachinerAPIV3 struct {
    *MachinerAPI
}

MachinerAPIV3 implements the V3 API used by the machiner worker. It removes SetProviderNetworkConfig.

func NewMachinerAPIV3 Uses

func NewMachinerAPIV3(
    st *state.State, resources facade.Resources, authorizer facade.Authorizer,
) (*MachinerAPIV3, error)

NewMachinerAPIV3 creates a new instance of the V3 Machiner API.

func (*MachinerAPIV3) SetProviderNetworkConfig Uses

func (api *MachinerAPIV3) SetProviderNetworkConfig(args params.Entities) (params.ErrorResults, error)

SetProviderNetworkConfig is no-op. This method stub is here, because the method was removed from the common networking API. It was only ever called by controller machine agents during start-up. Not only was this unnecessary, it duplicated link-layer devices on AWS.

Package machine imports 10 packages (graph) and is imported by 4 packages. Updated 2020-09-24. Refresh now. Tools for package owners.