Documentation ¶
Overview ¶
Package machine is for interacting with the machine state server. See //machine.
Index ¶
- type Machine
- func (m *Machine) DimensionsForSwarming() machine.SwarmingDimensions
- func (m *Machine) IsAvailable() bool
- func (m *Machine) IsRunningSwarmingTask() bool
- func (m *Machine) RebootDevice(ctx context.Context) error
- func (m *Machine) SetIsRunningSwarmingTask(isRunning bool)
- func (m *Machine) Start(ctx context.Context) error
- func (m *Machine) UpdateDescription(desc machine.Description)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
type Machine struct { // MachineID is the swarming id of the machine. MachineID string // Version of test_machine_monitor being run. Version string // contains filtered or unexported fields }
Machine is the interface to the machine state server. See //machine.
func New ¶
func New(ctx context.Context, local bool, instanceConfig config.InstanceConfig, version string, startSwarming bool, machineServerHost string, triggerInterrogationCh <-chan bool) (*Machine, error)
New return an instance of *Machine.
func (*Machine) DimensionsForSwarming ¶
func (m *Machine) DimensionsForSwarming() machine.SwarmingDimensions
DimensionsForSwarming returns the dimensions that should be reported to swarming.
func (*Machine) IsAvailable ¶
IsAvailable returns whether this Machine is currently willing to accept new tasks.
func (*Machine) IsRunningSwarmingTask ¶
IsRunningSwarmingTask returns true is a swarming task is currently running.
func (*Machine) RebootDevice ¶
RebootDevice reboots the attached device.
func (*Machine) SetIsRunningSwarmingTask ¶
SetIsRunningSwarmingTask records if a swarming task is being run.
func (*Machine) Start ¶
Start the background processes that send events to the sink and watch for changes to the Description.
func (*Machine) UpdateDescription ¶
func (m *Machine) UpdateDescription(desc machine.Description)
UpdateDescription applies any change in behavior based on the new given description. This impacts what we tell Swarming, what mode we are in, if we should communicate with a device via SSH, etc.