agent

package
v0.0.0-...-be26699 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

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

func (*Entity) ClearReboot

func (m *Entity) ClearReboot() error

ClearReboot clears the reboot flag of the machine.

func (*Entity) ContainerType

func (m *Entity) ContainerType() instance.ContainerType

ContainerType returns the type of container hosting this entity. If the entity is not a machine, it returns an empty string.

func (*Entity) Jobs

func (m *Entity) Jobs() []multiwatcher.MachineJob

Jobs returns the set of configured jobs if the API is running on behalf of a machine agent. When running for other agents, it will return the empty list.

func (*Entity) Life

func (m *Entity) Life() params.Life

Life returns the current life cycle state of the entity.

func (*Entity) SetPassword

func (m *Entity) SetPassword(password string) error

SetPassword sets the password associated with the agent's entity.

func (*Entity) Tag

func (m *Entity) Tag() string

Tag returns the entity's tag.

type State

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

State provides access to an agent's view of the state.

func NewState

func NewState(caller base.APICaller) *State

NewState returns a version of the state that provides functionality required by agent code.

func (*State) Entity

func (st *State) Entity(tag names.Tag) (*Entity, error)

func (*State) IsMaster

func (st *State) IsMaster() (bool, error)

IsMaster reports whether the connected machine agent lives at the same network address as the primary mongo server for the replica set. This call will return an error if the connected agent is not a machine agent with environment-manager privileges.

func (*State) StateServingInfo

func (st *State) StateServingInfo() (params.StateServingInfo, error)

Jump to

Keyboard shortcuts

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