code: func (c *cluster) saveTopology() error {
  
  	if err := os.MkdirAll(c.Path, 0777); err != nil {
  		return errors.Wrap(err, "creating directory")
  	}
  
  	if buf, err := proto.Marshal(encodeTopology(c.Topology)); err != nil {
  		return errors.Wrap(err, "marshalling")
  	} else if err := ioutil.WriteFile(filepath.Join(c.Path, ".topology"), buf, 0666); err != nil {
  		return errors.Wrap(err, "writing file")
  	}
  	return nil
  }
docs: // saveTopology writes the current topology to disk. unprotected.