-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathps.go
More file actions
29 lines (22 loc) · 799 Bytes
/
ps.go
File metadata and controls
29 lines (22 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package api
import "github.com/deis/controller-sdk-go/pkg/time"
// Pods defines the structure of a process.
type Pods struct {
Release string `json:"release"`
Type string `json:"type"`
Name string `json:"name"`
State string `json:"state"`
Started time.Time `json:"started"`
}
type PodsList []Pods
func (p PodsList) Len() int { return len(p) }
func (p PodsList) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
func (p PodsList) Less(i, j int) bool { return p[i].Name < p[j].Name }
type PodType struct {
Type string
PodsList PodsList
}
type PodTypes []PodType
func (p PodTypes) Len() int { return len(p) }
func (p PodTypes) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
func (p PodTypes) Less(i, j int) bool { return p[i].Type < p[j].Type }