machine

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLocalMachineState added in v0.2.0

func IsLocalMachineState(ms *MachineState) bool

IsLocalMachineState checks whether machine state matches the state of local machine

Types

type Machine

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

Machine provides the means for a caller to access a relatively up-to-date MachineState object.

func New

func New(static MachineState) *Machine

New creates a new Machine object. The provided state object will override those that might be dynamically generated by the Machine on the fly.

func (*Machine) HasMetadata

func (m *Machine) HasMetadata(metadata map[string][]string) bool

HasMetadata determine if a Machine fulfills the given requirements based on its current state.

func (*Machine) RefreshState added in v0.1.1

func (m *Machine) RefreshState() *MachineState

RefreshState generates a new MachineState object based on the current state of the underlying host, storing it internally for future reference before returning it.

func (*Machine) State added in v0.1.1

func (m *Machine) State() (state MachineState)

State returns a MachineState object representing the Machine's static state overlaid on its dynamic state at the time of execution.

func (*Machine) String

func (m *Machine) String() string

type MachineState added in v0.1.1

type MachineState struct {
	ID       string
	PublicIP string
	Metadata map[string]string
	Version  string
}

MachineState represents a point-in-time snapshot of the state of the local host.

func CurrentState added in v0.1.1

func CurrentState() MachineState

NewDynamicMachineState generates a MachineState object with the values read from the local system

func (MachineState) MatchID added in v0.3.0

func (s MachineState) MatchID(ID string) bool

func (MachineState) ShortID added in v0.3.0

func (s MachineState) ShortID() string

Jump to

Keyboard shortcuts

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