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

Method ReloadOrGet

osscluster.go:1135–1141  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

1133}
1134
1135func (c *clusterStateHolder) ReloadOrGet(ctx context.Context) (*clusterState, error) {
1136 state, err := c.Reload(ctx)
1137 if err == nil {
1138 return state, nil
1139 }
1140 return c.Get(ctx)
1141}
1142
1143//------------------------------------------------------------------------------
1144

Callers 3

ForEachMasterMethod · 0.80
ForEachSlaveMethod · 0.80
ForEachShardMethod · 0.80

Calls 2

ReloadMethod · 0.95
GetMethod · 0.95

Tested by

no test coverage detected