mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 03:47:51 +00:00
Remove clusterID and default name to ID
This commit is contained in:
parent
5705b45864
commit
1a04e94fc1
2 changed files with 3 additions and 7 deletions
8
api.go
8
api.go
|
|
@ -1739,13 +1739,11 @@ func (api *API) State() string {
|
|||
return api.cluster.State()
|
||||
}
|
||||
|
||||
// ClusterID returns the cluster ID.
|
||||
func (api *API) ClusterID() string {
|
||||
return api.cluster.id
|
||||
}
|
||||
|
||||
// ClusterName returns the cluster name.
|
||||
func (api *API) ClusterName() string {
|
||||
if api.cluster.Name == "" {
|
||||
return api.cluster.id
|
||||
}
|
||||
return api.cluster.Name
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -704,7 +704,6 @@ func (h *Handler) handleGetStatus(w http.ResponseWriter, r *http.Request) {
|
|||
Nodes: h.api.Hosts(r.Context()),
|
||||
NodeStates: h.api.HostStates(r.Context()),
|
||||
LocalID: h.api.Node().ID,
|
||||
ClusterID: h.api.ClusterID(),
|
||||
ClusterName: h.api.ClusterName(),
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
|
@ -765,7 +764,6 @@ type getStatusResponse struct {
|
|||
Nodes []*pilosa.Node `json:"nodes"`
|
||||
NodeStates map[string]string `json:"nodeStates"`
|
||||
LocalID string `json:"localID"`
|
||||
ClusterID string `json:"clusterID"`
|
||||
ClusterName string `json:"clusterName"`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue