Chromium Code Reviews| Index: milo/api/resp/builder.go |
| diff --git a/milo/api/resp/builder.go b/milo/api/resp/builder.go |
| index 46a30fe42a90870a7e15c6534760eff561072731..a34aa911ce43cd5d35f962c4f3a0722b04d5a96d 100644 |
| --- a/milo/api/resp/builder.go |
| +++ b/milo/api/resp/builder.go |
| @@ -2,6 +2,8 @@ |
| // Use of this source code is governed under the Apache License, Version 2.0 |
| // that can be found in the LICENSE file. |
| +//go:generate stringer -type=BotStatus |
| + |
| package resp |
| import "time" |
| @@ -70,10 +72,26 @@ type Builder struct { |
| NextCursor string `json:",omitempty"` |
| } |
| +type BotStatus int |
| + |
| +const ( |
| + UnknownStatus BotStatus = iota |
| + Idle |
| + Busy |
| + Disconnected |
| +) |
| + |
| +// Bot represents a single bot. |
| +type Bot struct { |
| + Name *Link |
|
iannucci
2017/06/16 01:44:16
embed the Link struct. we should use pointers iff:
Ryan Tseng
2017/06/16 02:05:42
Done.
|
| + Status BotStatus |
| +} |
| + |
| // MachinePool represents the capacity and availability of a builder. |
| type MachinePool struct { |
| - Connected int |
| - Total int |
| - Free int |
| - Used int |
| + Total int |
| + Disconnected int |
| + Idle int |
| + Busy int |
| + Bots []Bot |
| } |