remove dead code (api.HostStates())

This commit is contained in:
Travis 2021-02-12 21:51:27 -06:00
parent d3ffdafdd8
commit 9fa271a7b8
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E
2 changed files with 0 additions and 15 deletions

6
api.go
View file

@ -802,12 +802,6 @@ func (api *API) Hosts(ctx context.Context) []*topology.Node {
return api.cluster.Nodes()
}
func (api *API) HostStates(ctx context.Context) map[string]string {
span, _ := tracing.StartSpanFromContext(ctx, "API.HostStates")
defer span.Finish()
return api.cluster.AllNodeStates()
}
// Node gets the ID, URI and coordinator status for this particular node.
func (api *API) Node() *topology.Node {
return api.server.node()

View file

@ -730,15 +730,6 @@ func (c *cluster) Nodes() []*topology.Node {
return nodes
}
func (c *cluster) AllNodeStates() map[string]string {
// TODO: is this being used by the UI?
// c.mu.RLock()
// defer c.mu.RUnlock()
// return c.Topology.nodeStates
m := make(map[string]string)
return m
}
// removeNodeBasicSorted removes a node from the cluster, maintaining the sort
// order. Returns true if the node was removed. unprotected.
func (c *cluster) removeNodeBasicSorted(nodeID string) bool {