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

Method Next

internal/routing/shard_picker.go:11–11  ·  view source on GitHub ↗
(total int)

Source from the content-addressed store, hash-verified

9// ReqDefault and the command has no keys.
10type ShardPicker interface {
11 Next(total int) int // returns an index in [0,total)
12}
13
14// StaticShardPicker always returns the same shard index.

Callers 15

iterator_test.goFile · 0.65
BenchmarkPoolGetPutFunction · 0.65
mapCmdsByNodeMethod · 0.65
BenchmarkRedisPingFunction · 0.65
BenchmarkRedisGetNilFunction · 0.65
BenchmarkRedisSetStringFunction · 0.65

Implementers 4

ScanIteratoriterator.go
StaticShardPickerinternal/routing/shard_picker.go
RoundRobinPickerinternal/routing/shard_picker.go
RandomPickerinternal/routing/shard_picker.go

Calls

no outgoing calls

Tested by 15

BenchmarkPoolGetPutFunction · 0.52
BenchmarkRedisPingFunction · 0.52
BenchmarkRedisGetNilFunction · 0.52
BenchmarkRedisSetStringFunction · 0.52
benchmarkRedisGetFunction · 0.52