Unexport Topology.Encode

This commit is contained in:
Cody Soyland 2018-07-05 21:54:30 -05:00
parent 3f7f82bf05
commit 65472609a5
2 changed files with 3 additions and 3 deletions

View file

@ -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)
}

View file

@ -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