(ctx context.Context, key string)
| 52 | } |
| 53 | |
| 54 | func (c *ClusterClient) SwapNodes(ctx context.Context, key string) error { |
| 55 | nodes, err := c.Nodes(ctx, key) |
| 56 | if err != nil { |
| 57 | return err |
| 58 | } |
| 59 | nodes[0], nodes[1] = nodes[1], nodes[0] |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | func (c *clusterState) IsConsistent(ctx context.Context) bool { |
| 64 | if len(c.Masters) < 3 { |