forked from mattbaird/elastigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clusterhealthresponses.go
45 lines (38 loc) · 1.37 KB
/
clusterhealthresponses.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
package elastigo
type ClusterHealthResponse struct {
ClusterName string `json:"cluster_name"`
Status string `json:"status"`
TimedOut bool `json:"timed_out"`
NumberOfNodes int `json:"number_of_nodes"`
NumberOfDataNodes int `json:"number_of_data_nodes"`
ActivePrimaryShards int `json:"active_primary_shards"`
ActiveShards int `json:"active_shards"`
RelocatingShards int `json:"relocating_shards"`
InitializingShards int `json:"initializing_shards"`
UnassignedShards int `json:"unassigned_shards"`
}
type ClusterStateResponse struct {
ClusterName string `json:"cluster_name"`
MasterNode string `json:"master_node"`
Nodes map[string]ClusterStateNodeResponse `json:"nodes"`
Metadata ClusterStateMetadataResponse `json:"metadata"`
// TODO: Routing Table
// TODO: Routing Nodes
// TODO: Allocations
}
type ClusterStateNodeResponse struct {
Name string `json:"name"`
TransportAddress string `json:"transport_address"`
// TODO: Attributes
}
type ClusterStateMetadataResponse struct {
// TODO: templates
Indices map[string]ClusterStateIndiceResponse `json:"indices"`
}
type ClusterStateIndiceResponse struct {
State string `json:"state"`
}
type ClusterStateRoutingTableResponse struct {
// TODO: unassigned
//
}