We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed47aa commit 656dcb6Copy full SHA for 656dcb6
2 files changed
api/ps.go
@@ -10,11 +10,13 @@ type ProcessType map[string]string
10
11
// Pods defines the structure of a process.
12
type Pods struct {
13
- Release string `json:"release"`
14
- Type string `json:"type"`
15
- Name string `json:"name"`
16
- State string `json:"state"`
17
- Started time.Time `json:"started"`
+ Release string `json:"release"`
+ Type string `json:"type"`
+ Name string `json:"name"`
+ State string `json:"state"`
+ Ready string `json:"ready"`
18
+ Restarts int `json:"restarts"`
19
+ Started time.Time `json:"started"`
20
}
21
22
// PodsList defines a collection of app pods.
api/ps_test.go
@@ -9,10 +9,10 @@ import (
9
func TestPodsListSorted(t *testing.T) {
pods := PodsList{
- {"", "web", "web.fsdfgh4", "up", time.Time{}},
- {"", "web", "web.asdfgh1", "up", time.Time{}},
- {"", "web", "web.csdfgh3", "up", time.Time{}},
- {"", "web", "web.bsdfgh2", "up", time.Time{}},
+ {"", "web", "web.fsdfgh4", "up", "1/1", 0, time.Time{}},
+ {"", "web", "web.asdfgh1", "up", "1/1", 0, time.Time{}},
+ {"", "web", "web.csdfgh3", "up", "1/1", 0, time.Time{}},
+ {"", "web", "web.bsdfgh2", "up", "1/1", 0, time.Time{}},
sort.Sort(pods)
0 commit comments