(ctx context.Context, cluster *Cluster)
| 242 | } |
| 243 | |
| 244 | func (n *ClusterNode) SyncClusterInfo(ctx context.Context, cluster *Cluster) error { |
| 245 | clusterStr, err := cluster.ToSlotString() |
| 246 | if err != nil { |
| 247 | return err |
| 248 | } |
| 249 | redisCli := n.GetClient() |
| 250 | err = redisCli.Do(ctx, "CLUSTERX", "SETNODEID", n.id).Err() |
| 251 | if err != nil { |
| 252 | return err |
| 253 | } |
| 254 | return redisCli.Do(ctx, "CLUSTERX", "SETNODES", clusterStr, cluster.Version.Load()).Err() |
| 255 | } |
| 256 | |
| 257 | func (n *ClusterNode) Reset(ctx context.Context) error { |
| 258 | if n.IsMaster() { |