MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / Clone

Method Clone

store/cluster.go:80–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80func (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.
93func (cluster *Cluster) SetPassword(password string) {

Callers 2

TestCluster_CloneFunction · 0.95
migrationLoopMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestCluster_CloneFunction · 0.76