| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package resp | 5 package resp |
| 6 | 6 |
| 7 import "time" | 7 import ( |
| 8 » "time" |
| 9 |
| 10 » "github.com/luci/luci-go/milo/appengine/common/model" |
| 11 ) |
| 8 | 12 |
| 9 // Interval is a time interval which has a start, an end and a duration. | 13 // Interval is a time interval which has a start, an end and a duration. |
| 10 type Interval struct { | 14 type Interval struct { |
| 11 Started time.Time // when did this interval start | 15 Started time.Time // when did this interval start |
| 12 Finished time.Time // when did this interval finish | 16 Finished time.Time // when did this interval finish |
| 13 Duration time.Duration // length of the interval; may be non-zero if Fin
ished is zero | 17 Duration time.Duration // length of the interval; may be non-zero if Fin
ished is zero |
| 14 } | 18 } |
| 15 | 19 |
| 16 // BuildSummary is a summary of a build, with just enough information for displa
y | 20 // BuildSummary is a summary of a build, with just enough information for displa
y |
| 17 // on a builders page, with an optional field to return the whole build | 21 // on a builders page, with an optional field to return the whole build |
| 18 // information if available. | 22 // information if available. |
| 19 type BuildSummary struct { | 23 type BuildSummary struct { |
| 20 // Link to the build. | 24 // Link to the build. |
| 21 Link *Link | 25 Link *Link |
| 22 | 26 |
| 23 // Status of the build. | 27 // Status of the build. |
| 24 » Status Status | 28 » Status model.Status |
| 25 | 29 |
| 26 // Pending is time interval that this build was pending. | 30 // Pending is time interval that this build was pending. |
| 27 PendingTime Interval | 31 PendingTime Interval |
| 28 | 32 |
| 29 // Execution is time interval that this build was executing. | 33 // Execution is time interval that this build was executing. |
| 30 ExecutionTime Interval | 34 ExecutionTime Interval |
| 31 | 35 |
| 32 // Revision is the main revision of the build. | 36 // Revision is the main revision of the build. |
| 33 // TODO(hinoka): Maybe use a commit object instead? | 37 // TODO(hinoka): Maybe use a commit object instead? |
| 34 Revision string | 38 Revision string |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 NextCursor string `json:",omitempty"` | 74 NextCursor string `json:",omitempty"` |
| 71 } | 75 } |
| 72 | 76 |
| 73 // MachinePool represents the capacity and availability of a builder. | 77 // MachinePool represents the capacity and availability of a builder. |
| 74 type MachinePool struct { | 78 type MachinePool struct { |
| 75 Connected int | 79 Connected int |
| 76 Total int | 80 Total int |
| 77 Free int | 81 Free int |
| 78 Used int | 82 Used int |
| 79 } | 83 } |
| OLD | NEW |