Version: v0.0.0-...-9a03d5f Latest Latest

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 9 Imported by: 21




This section is empty.


This section is empty.


This section is empty.


type Machine

type Machine struct {
	// contains filtered or unexported fields

Machine represents a juju machine as seen by a machiner worker.

func (*Machine) EnsureDead

func (m *Machine) EnsureDead() error

EnsureDead sets the machine lifecycle to Dead if it is Alive or Dying. It does nothing otherwise.

func (*Machine) Jobs

func (m *Machine) Jobs() (*params.JobsResult, error)

Jobs returns a list of jobs for the machine.

func (*Machine) Life

func (m *Machine) Life() life.Value

Life returns the machine's lifecycle value.

func (*Machine) RecordAgentStartInformation

func (m *Machine) RecordAgentStartInformation(hostname string) error

RecordAgentStartInformation reports the host name of the machine and updates the start time for the agent.

func (*Machine) Refresh

func (m *Machine) Refresh() error

Refresh updates the cached local copy of the machine's data.

func (*Machine) SetMachineAddresses

func (m *Machine) SetMachineAddresses(addresses []network.MachineAddress) error

SetMachineAddresses sets the machine determined addresses of the machine.

func (*Machine) SetObservedNetworkConfig

func (m *Machine) SetObservedNetworkConfig(netConfig []params.NetworkConfig) error

SetObservedNetworkConfig sets the machine network config as observed on the machine.

func (*Machine) SetStatus

func (m *Machine) SetStatus(status status.Status, info string, data map[string]interface{}) error

SetStatus sets the status of the machine.

func (*Machine) Tag

func (m *Machine) Tag() names.Tag

Tag returns the machine's tag.

func (*Machine) Watch

func (m *Machine) Watch() (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to the machine.

type State

type State struct {
	// contains filtered or unexported fields

State provides access to the Machiner API facade.

func NewState

func NewState(caller base.APICaller) *State

NewState creates a new client-side Machiner facade.

func (*State) Machine

func (st *State) Machine(tag names.MachineTag) (*Machine, error)

Machine provides access to methods of a state.Machine through the facade.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL