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 ¶
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.
type MachineState ¶ added in v0.1.1
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