/
json_objects.go
158 lines (155 loc) · 4.66 KB
/
json_objects.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
package qdb
import "time"
// NodeStatus : a json representation object containing the status of a node
type NodeStatus struct {
Memory struct {
VM struct {
Used int64 `json:"used"`
Total int64 `json:"total"`
} `json:"vm"`
Physmem struct {
Used int64 `json:"used"`
Total int64 `json:"total"`
} `json:"physmem"`
} `json:"memory"`
CPUTimes struct {
Idle int64 `json:"idle"`
System int64 `json:"system"`
User int64 `json:"user"`
} `json:"cpu_times"`
DiskUsage struct {
Free int64 `json:"free"`
Total int64 `json:"total"`
} `json:"disk_usage"`
Network struct {
ListeningEndpoint string `json:"listening_endpoint"`
Partitions struct {
Count int `json:"count"`
MaxSessions int `json:"max_sessions"`
AvailableSessions int `json:"available_sessions"`
} `json:"partitions"`
} `json:"network"`
NodeID string `json:"node_id"`
OperatingSystem string `json:"operating_system"`
HardwareConcurrency int `json:"hardware_concurrency"`
Timestamp time.Time `json:"timestamp"`
Startup time.Time `json:"startup"`
EngineVersion string `json:"engine_version"`
EngineBuildDate time.Time `json:"engine_build_date"`
Entries struct {
Resident struct {
Count int `json:"count"`
Size int `json:"size"`
} `json:"resident"`
Persisted struct {
Count int `json:"count"`
Size int `json:"size"`
} `json:"persisted"`
} `json:"entries"`
Operations struct {
Get struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"get"`
GetAndRemove struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"get_and_remove"`
Put struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"put"`
Update struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"update"`
GetAndUpdate struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"get_and_update"`
CompareAndSwap struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"compare_and_swap"`
Remove struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"remove"`
RemoveIf struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"remove_if"`
PurgeAll struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"purge_all"`
} `json:"operations"`
Overall struct {
Count int `json:"count"`
Successes int `json:"successes"`
Failures int `json:"failures"`
Pageins int `json:"pageins"`
Evictions int `json:"evictions"`
InBytes int `json:"in_bytes"`
OutBytes int `json:"out_bytes"`
} `json:"overall"`
}
type NodeTopology struct {
Predecessor struct {
Reference string `json:"reference"`
Endpoint string `json:"endpoint"`
} `json:"predecessor"`
Center struct {
Reference string `json:"reference"`
Endpoint string `json:"endpoint"`
} `json:"center"`
Successor struct {
Reference string `json:"reference"`
Endpoint string `json:"endpoint"`
} `json:"successor"`
}