From 774e91ad30053bf9c361ea623d9de25d82afafc9 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Thu, 19 Jul 2018 09:40:23 -0500 Subject: [PATCH] finish commenting methods as unprotected. --- cluster.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cluster.go b/cluster.go index 7047a6d4a..1878e234c 100644 --- a/cluster.go +++ b/cluster.go @@ -1500,7 +1500,7 @@ func (t *Topology) encode() *internal.Topology { return encodeTopology(t) } -// loadTopology reads the topology for the node. +// loadTopology reads the topology for the node. unprotected. func (c *cluster) loadTopology() error { buf, err := ioutil.ReadFile(filepath.Join(c.Path, ".topology")) if os.IsNotExist(err) { @@ -1523,7 +1523,7 @@ func (c *cluster) loadTopology() error { return nil } -// saveTopology writes the current topology to disk. +// saveTopology writes the current topology to disk. unprotected. func (c *cluster) saveTopology() error { if err := os.MkdirAll(c.Path, 0777); err != nil { @@ -1765,6 +1765,8 @@ func (c *cluster) mergeClusterStatus(cs *ClusterStatus) error { return nil } +// setStatic is unprotected, but only called before the cluster has been started +// (and therefore not concurrently). func (c *cluster) setStatic(hosts []string) error { c.Static = true c.Coordinator = c.Node.ID