From 9fa271a7b8b4ecf0054f845ecf063cfbc0bcea55 Mon Sep 17 00:00:00 2001 From: Travis Date: Fri, 12 Feb 2021 21:51:27 -0600 Subject: [PATCH] remove dead code (api.HostStates()) --- api.go | 6 ------ cluster.go | 9 --------- 2 files changed, 15 deletions(-) diff --git a/api.go b/api.go index d0f4c4723..417b45dfc 100644 --- a/api.go +++ b/api.go @@ -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() diff --git a/cluster.go b/cluster.go index 222e5c4c4..715bcea86 100644 --- a/cluster.go +++ b/cluster.go @@ -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 {