-
Notifications
You must be signed in to change notification settings - Fork 1
/
clustersoverview.go
30 lines (26 loc) · 1.53 KB
/
clustersoverview.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
package api
// Copyright 2022 Severalnines AB
//
// This file is part of cmon-proxy.
//
// cmon-proxy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License.
//
// cmon-proxy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with cmon-proxy. If not, see <https://www.gnu.org/licenses/>.
type ClustersOverview struct {
// an overview of all clusters status (map key: status string)
// for complete list see: https://github.com/severalnines/clustercontrol-enterprise/blob/master/src/cmoncluster.cpp#L3924
ClusterStatus map[string]int `json:"cluster_states,omitempty"`
// clusters count by controller (map key: URL)
ClustersCount map[string]int `json:"clusters_count,omitempty"`
NodesCount map[string]int `json:"nodes_count,omitempty"`
// the node states see:
NodeStates map[string]int `json:"node_states,omitempty"`
// for the "technology" filters
ByClusterType map[string]*ClustersOverview `json:"by_cluster_type,omitempty"`
// states for each controller
ByController map[string]*ClustersOverview `json:"by_controller,omitempty"`
// states by controller by cluster, only present inside by_controller
ByCluster map[string]*ClustersOverview `json:"by_cluster,omitempty"`
}