deployer

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

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

Go to latest
Published: Dec 20, 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 {
	// contains filtered or unexported fields
}

Client provides access to the deployer worker's idea of the state.

func NewClient

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

NewClient creates a new Client instance that makes API calls through the given caller.

func (*Client) Machine

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

Machine returns the machine with the given tag.

func (*Client) Unit

func (c *Client) Unit(ctx context.Context, tag names.UnitTag) (*Unit, error)

Unit returns the unit with the given tag.

type Machine

type Machine struct {
	// contains filtered or unexported fields
}

Machine represents a juju machine as seen by the deployer worker.

func (*Machine) WatchUnits

func (m *Machine) WatchUnits(ctx context.Context) (watcher.StringsWatcher, error)

WatchUnits starts a StringsWatcher to watch all units deployed to the machine, in order to track which ones should be deployed or recalled.

type Option

type Option = base.Option

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

type Unit

type Unit struct {
	// contains filtered or unexported fields
}

Unit represents a juju unit as seen by the deployer worker.

func (*Unit) Life

func (u *Unit) Life() life.Value

Life returns the unit's lifecycle value.

func (*Unit) Name

func (u *Unit) Name() string

Name returns the unit's name.

func (*Unit) Refresh

func (u *Unit) Refresh(ctx context.Context) error

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

func (*Unit) Remove

func (u *Unit) Remove(ctx context.Context) error

Remove removes the unit from state, calling EnsureDead first, then Remove.

func (*Unit) SetPassword

func (u *Unit) SetPassword(ctx context.Context, password string) error

SetPassword sets the unit's password.

func (*Unit) SetStatus

func (u *Unit) SetStatus(ctx context.Context, unitStatus status.Status, info string, data map[string]interface{}) error

SetStatus sets the status of the unit.

func (*Unit) Tag

func (u *Unit) Tag() string

Tag returns the unit's tag.

Jump to

Keyboard shortcuts

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