()
| 78 | } |
| 79 | |
| 80 | func (cluster *Cluster) Clone() *Cluster { |
| 81 | clone := &Cluster{ |
| 82 | Name: cluster.Name, |
| 83 | Shards: make([]*Shard, 0), |
| 84 | } |
| 85 | clone.Version.Store(cluster.Version.Load()) |
| 86 | for _, shard := range cluster.Shards { |
| 87 | clone.Shards = append(clone.Shards, shard.Clone()) |
| 88 | } |
| 89 | return clone |
| 90 | } |
| 91 | |
| 92 | // SetPassword will set the password for all nodes in the cluster. |
| 93 | func (cluster *Cluster) SetPassword(password string) { |
no outgoing calls