machine

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2014 License: Apache-2.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 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(bootId string, publicIP string, metadata map[string]string) *Machine

New creates a new Machine object. The provided parameters 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 {
	BootId   string
	PublicIP string
	Metadata map[string]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) String added in v0.1.2

func (ms MachineState) String() string

Jump to

Keyboard shortcuts

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