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

Function newClusterStateHolder

osscluster.go:1071–1076  ·  view source on GitHub ↗
(load func(ctx context.Context) (*clusterState, error), reloadInterval time.Duration)

Source from the content-addressed store, hash-verified

1069}
1070
1071func newClusterStateHolder(load func(ctx context.Context) (*clusterState, error), reloadInterval time.Duration) *clusterStateHolder {
1072 return &clusterStateHolder{
1073 load: load,
1074 reloadInterval: reloadInterval,
1075 }
1076}
1077
1078func (c *clusterStateHolder) Reload(ctx context.Context) (*clusterState, error) {
1079 state, err := c.load(ctx)

Callers 2

NewClusterClientFunction · 0.85

Calls

no outgoing calls

Tested by 1