Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformBotIDToDevice ¶
TransformBotIDToDevice transforms the bot id to a bot id with device, e.g. skia-foo -> skia-foo-device
Types ¶
type Decider ¶
type Decider interface { // ShouldPowercycleBot returns true if the bot/host supports powercycling // and is in a state that would be fixed by powercycling. ShouldPowercycleBot(*swarming.SwarmingRpcsBotInfo) bool // ShouldPowercycleBot returns true if the device supports powercycling // and is in a state that would be fixed by powercycling. ShouldPowercycleDevice(*swarming.SwarmingRpcsBotInfo) bool }
The Decider interface abstracts away the logic to decide if a bot/device 1) is powercycleable and 2) should be powercycled
type MockDecider ¶
func NewMockDecider ¶
func NewMockDecider() *MockDecider
NewMockDecider returns a pointer to a newly created struct. We return the pointer because we want to make sure the methods on mock.Mock stay accessible, e.g. m.On()
func (*MockDecider) ShouldPowercycleBot ¶
func (m *MockDecider) ShouldPowercycleBot(bot *swarming.SwarmingRpcsBotInfo) bool
func (*MockDecider) ShouldPowercycleDevice ¶
func (m *MockDecider) ShouldPowercycleDevice(bot *swarming.SwarmingRpcsBotInfo) bool
Click to show internal directories.
Click to hide internal directories.