machiner

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithTracer = base.WithTracer

WithTracer returns an Option that configures the Client to use the supplied tracer.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.APIAddresser
	// contains filtered or unexported fields
}

Client provides access to the Machiner API facade.

func NewClient

func NewClient(caller base.APICaller, options ...Option) *Client

NewClient creates a new client-side Machiner facade.

func (*Client) Machine

func (c *Client) Machine(ctx context.Context, tag names.MachineTag) (*Machine, error)

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

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(ctx context.Context) error

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

func (*Machine) IsController

func (m *Machine) IsController(ctx context.Context, machineName string) (bool, error)

IsController returns true if the provided machine is a controller one.

func (*Machine) Life

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

Life returns the machine's lifecycle value.

func (*Machine) RecordAgentStartInformation

func (m *Machine) RecordAgentStartInformation(ctx context.Context, 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(ctx context.Context) error

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

func (*Machine) SetMachineAddresses

func (m *Machine) SetMachineAddresses(ctx context.Context, addresses []network.MachineAddress) error

SetMachineAddresses sets the machine determined addresses of the machine.

func (*Machine) SetObservedNetworkConfig

func (m *Machine) SetObservedNetworkConfig(ctx context.Context, netConfig []params.NetworkConfig) error

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

func (*Machine) SetStatus

func (m *Machine) SetStatus(ctx context.Context, 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(ctx context.Context) (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to the machine.

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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