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

Struct Ring

ring.go:591–599  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Ring is a Redis client that uses consistent hashing to distribute keys across multiple Redis servers (shards). It's safe for concurrent use by multiple goroutines. Ring monitors the state of each shard and removes dead s

Source from the content-addressed store, hash-verified

589// and can tolerate losing data when one of the servers dies.
590// Otherwise you should use Redis Cluster.
591type Ring struct {
592 cmdable
593 hooksMixin
594
595 opt *RingOptions
596 sharding *ringSharding
597 cmdsInfoCache *cmdsInfoCache
598 heartbeatCancelFn context.CancelFunc
599}
600
601// NewRing returns a Redis Ring client to the Redis Server specified by RingOptions.
602// Passing nil RingOptions will cause a panic.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected