-
Notifications
You must be signed in to change notification settings - Fork 490
/
distcc_resource.go
64 lines (54 loc) · 1.97 KB
/
distcc_resource.go
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package types
// BcsClusterResource describe the bcs cluster resource report status.
type BcsClusterResource struct {
DiskTotal float64 `json:"disktotal"`
MemTotal float64 `json:"memtotal"`
CPUTotal float64 `json:"cputotal"`
DiskUsed float64 `json:"diskused"`
MemUsed float64 `json:"memused"`
CPUUsed float64 `json:"cpuused"`
Agents []BcsClusterAgentInfo `json:"agents"`
}
// BcsClusterAgentInfo describe the bcs single agent resource report status.
type BcsClusterAgentInfo struct {
HostName string `json:"hostname"`
IP string `json:"ip"`
DiskTotal float64 `json:"disktotal"`
MemTotal float64 `json:"memtotal"`
CPUTotal float64 `json:"cputotal"`
DiskUsed float64 `json:"diskused"`
MemUsed float64 `json:"memused"`
CPUUsed float64 `json:"cpuused"`
Disabled bool `json:"disabled"`
HostAttributes []*BcsAgentAttribute `json:"host_attributes"`
Attributes []*BcsAgentAttribute `json:"attributes"`
RegisteredTime int64 `json:"registered_time"`
ReRegisteredTime int64 `json:"reregistered_time"`
}
// MesosValueScalar scalar value type.
type MesosValueScalar struct {
Value float64 `json:"value"`
}
// MesosValueRanges range value type.
type MesosValueRanges struct {
Begin uint64 `json:"begin"`
End uint64 `json:"end"`
}
// MesosValueText text value type.
type MesosValueText struct {
Value string `json:"value"`
}
// MesosValueSet set value type.
type MesosValueSet struct {
Item []string `json:"item"`
}
type MesosValueType int32
// BcsAgentAttribute define the bcs single agent's attributes.
type BcsAgentAttribute struct {
Name string `json:"name,omitempty"`
Type MesosValueType `json:"type,omitempty"`
Scalar *MesosValueScalar `json:"scalar,omitempty"`
Ranges []*MesosValueRanges `json:"ranges,omitempty"`
Set *MesosValueSet `json:"set,omitempty"`
Text *MesosValueText `json:"text,omitempty"`
}