Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2299)

Unified Diff: milo/api/resp/builder.go

Issue 2931773004: Milo: Add machine pool info for buildbot builder view. (Closed)
Patch Set: Review Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/api/resp/botstatus_string.go ('k') | milo/appengine/buildbot/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/api/resp/builder.go
diff --git a/milo/api/resp/builder.go b/milo/api/resp/builder.go
index 46a30fe42a90870a7e15c6534760eff561072731..ca1d46045a87c5cb4245602105589d9d6307f60c 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
+ 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
}
« no previous file with comments | « milo/api/resp/botstatus_string.go ('k') | milo/appengine/buildbot/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698