MCPcopy
hub / github.com/redis/go-redis / SwapNodes

Method SwapNodes

export_test.go:54–61  ·  view source on GitHub ↗
(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

52}
53
54func (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
63func (c *clusterState) IsConsistent(ctx context.Context) bool {
64 if len(c.Masters) < 3 {

Callers 1

osscluster_test.goFile · 0.80

Calls 1

NodesMethod · 0.95

Tested by

no test coverage detected