From 3f7f82bf058a2fbbe91cac2d9839423831032d96 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 5 Jul 2018 21:54:23 -0500 Subject: [PATCH] Unexport Topology.AddID --- cluster.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster.go b/cluster.go index 6f0a88904..e49e07111 100644 --- a/cluster.go +++ b/cluster.go @@ -323,7 +323,7 @@ func (c *cluster) addNode(node *Node) error { if c.Topology == nil { return fmt.Errorf("Cluster.Topology is nil") } - if !c.Topology.AddID(node.ID) { + if !c.Topology.addID(node.ID) { return nil } @@ -1429,8 +1429,8 @@ func (t *Topology) positionByID(nodeID string) int { return -1 } -// AddID adds the node ID to the topology and returns true if added. -func (t *Topology) AddID(nodeID string) bool { +// addID adds the node ID to the topology and returns true if added. +func (t *Topology) addID(nodeID string) bool { t.mu.Lock() defer t.mu.Unlock() if t.containsID(nodeID) {