Documentation
¶
Overview ¶
Package cluster provides a sorted-set API (via Redis ZSETs) on top of a group of Redis instances.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
Cluster defines methods that efficiently provide ZSET semantics on a cluster.
func New ¶
func New(shards *shard.Shards, maxSize int, instr instrumentation.Instrumentation) Cluster
New creates and returns a new Cluster backed by a concrete Redis cluster. maxSize for each key will be enforced at write time. Instrumentation may be nil.
type Deleter ¶
type Deleter interface {
Delete(tuples []common.KeyScoreMember) error
}
Deleter defines the method to delete elements from a sorted set. A key- member's score must be larger than the currently stored score for the delete to be accepted. A non-nil error indicates only physical problems, not logical.
type Element ¶
type Element struct { Key string KeyScoreMembers []common.KeyScoreMember Error error }
Element combines a submitted key with its selected score-members. If there was an error while selecting a key, the error field will be populated, and common.KeyScoreMembers may be empty. TODO rename.
type Inserter ¶
type Inserter interface {
Insert(tuples []common.KeyScoreMember) error
}
Inserter defines the method to add elements to a sorted set. A key-member's score must be larger than the currently stored score for the insert to be accepted. A non-nil error indicates only physical problems, not logical.