diff --git a/cluster.go b/cluster.go index e49e07111..4919e4e10 100644 --- a/cluster.go +++ b/cluster.go @@ -1463,8 +1463,8 @@ func (t *Topology) RemoveID(nodeID string) bool { return true } -// Encode converts t into its internal representation. -func (t *Topology) Encode() *internal.Topology { +// encode converts t into its internal representation. +func (t *Topology) encode() *internal.Topology { return encodeTopology(t) } diff --git a/utils_internal_test.go b/utils_internal_test.go index 816c477ce..1f58c464c 100644 --- a/utils_internal_test.go +++ b/utils_internal_test.go @@ -185,7 +185,7 @@ func (t *ClusterCluster) addNode() error { // WriteTopology writes the given topology to disk. func (t *ClusterCluster) WriteTopology(path string, top *Topology) error { - if buf, err := proto.Marshal(top.Encode()); err != nil { + if buf, err := proto.Marshal(top.encode()); err != nil { return err } else if err := ioutil.WriteFile(filepath.Join(path, ".topology"), buf, 0666); err != nil { return err