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

Method Close

osscluster_test.go:90–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88}
89
90func (s *clusterScenario) Close() error {
91 ctx := context.TODO()
92 for _, master := range s.masters() {
93 if master == nil {
94 continue
95 }
96 err := master.FlushAll(ctx).Err()
97 if err != nil {
98 return err
99 }
100
101 // since 7.2 forget calls should be propagated, calling only master
102 // nodes should be sufficient.
103 for _, nID := range s.nodeIDs {
104 master.ClusterForget(ctx, nID)
105 }
106 }
107
108 return nil
109}
110
111func configureClusterTopology(ctx context.Context, scenario *clusterScenario) error {
112 allowErrs := []string{

Callers

nothing calls this directly

Calls 4

mastersMethod · 0.95
ErrMethod · 0.65
FlushAllMethod · 0.65
ClusterForgetMethod · 0.65

Tested by

no test coverage detected