Documentation ¶
Index ¶
- type BitMap
- func (bm *BitMap) BitCount(ctx context.Context, start, end int64) (int64, error)
- func (bm *BitMap) BitCountAll(ctx context.Context) (int64, error)
- func (bm *BitMap) BitField(ctx context.Context) (int64, error)
- func (bm *BitMap) BitFieldReadOnly(ctx context.Context, enc string, offset int64) (int64, error)
- func (bm *BitMap) BitOp(ctx context.Context, op BitMapOp, keys ...string) (int64, error)
- func (bm *BitMap) BitPos(ctx context.Context, bit int64, pos ...int64) (int64, error)
- func (bm *BitMap) GetBit(ctx context.Context, offset int64) (int64, error)
- func (bm *BitMap) SetBit(ctx context.Context, offset int64, value int) (int64, error)
- type BitMapOp
- type Client
- type Geo
- func (g *Geo) Add(ctx context.Context, geoLocation ...*GeoLocation) (int64, error)
- func (g *Geo) Dist(ctx context.Context, member1, member2 string, unit GeoUnit) (float64, error)
- func (g *Geo) Hash(ctx context.Context, members ...string) ([]string, error)
- func (g *Geo) Position(ctx context.Context, members ...string) ([]*GeoPos, error)
- func (g *Geo) Radius(ctx context.Context, longitude, latitude float64, query GeoRadiusQuery) ([]GeoLocation, error)
- func (g *Geo) RadiusByMember(ctx context.Context, member string, query GeoRadiusQuery) ([]GeoLocation, error)
- func (g *Geo) Search(ctx context.Context) error
- func (g *Geo) SearchStore(ctx context.Context) error
- type GeoLocation
- type GeoPos
- type GeoRadiusQuery
- type GeoUnit
- type HashMap
- func (hm *HashMap) Delete(ctx context.Context, fields ...string) (int64, error)
- func (hm *HashMap) Exists(ctx context.Context, field string) (bool, error)
- func (hm *HashMap) Get(ctx context.Context, field string) (string, error)
- func (hm *HashMap) GetAll(ctx context.Context) (map[string]string, error)
- func (hm *HashMap) IncBy(ctx context.Context, field string, delta int64) (int64, error)
- func (hm *HashMap) IncByFloat(ctx context.Context, field string, delta float64) (float64, error)
- func (hm *HashMap) Keys(ctx context.Context) ([]string, error)
- func (hm *HashMap) Len(ctx context.Context) (int64, error)
- func (hm *HashMap) MultiGet(ctx context.Context, fields ...string) ([]Value, error)
- func (hm *HashMap) MultiSet(ctx context.Context, fields map[string]Value) error
- func (hm *HashMap) RandomField(ctx context.Context, cursor uint64, match string, count int64) (_ []string, _ uint64, _ error)
- func (hm *HashMap) Scan(ctx context.Context, cursor uint64, match string, count int64) ([]string, uint64, error)
- func (hm *HashMap) Set(ctx context.Context, field string, value Value) error
- func (hm *HashMap) SetNotExist(ctx context.Context, field string, value Value) (int64, error)
- func (hm *HashMap) Strlen(ctx context.Context, key, field string) (int64, error)
- func (hm *HashMap) Values(ctx context.Context) ([]string, error)
- type HyperLogLog
- func (h *HyperLogLog) Add(ctx context.Context, values ...string) (int64, error)
- func (h *HyperLogLog) Count(ctx context.Context) (int64, error)
- func (h *HyperLogLog) CountWith(ctx context.Context, keys ...string) (int64, error)
- func (h *HyperLogLog) Merge(ctx context.Context, keys ...string) error
- func (h *HyperLogLog) MergeInto(ctx context.Context, dst string, keys ...string) error
- type List
- func (list List) BlockingLeftMove(ctx context.Context) error
- func (list List) BlockingLeftMultiPop(ctx context.Context) error
- func (list List) BlockingLeftPop(ctx context.Context) error
- func (list List) BlockingRightPop(ctx context.Context) error
- func (list List) BlockingRightPopLeftPush(ctx context.Context) error
- func (list List) Index(ctx context.Context, index int64) (string, error)
- func (list List) Insert(ctx context.Context, mode string, pivot, element string) (int64, error)
- func (list List) LeftMove(ctx context.Context, destination, from, to string) (string, error)
- func (list List) LeftMultiPop(ctx context.Context) error
- func (list List) LeftPop(ctx context.Context, count int64) ([]string, error)
- func (list List) LeftPos(ctx context.Context) error
- func (list List) LeftPush(ctx context.Context, elements ...string) (int64, error)
- func (list List) LeftPushX(ctx context.Context, elements ...string) (int64, error)
- func (list List) Len(ctx context.Context) (int64, error)
- func (list List) Name() string
- func (list List) Range(ctx context.Context, start, stop int64) ([]string, error)
- func (list List) Remove(ctx context.Context, count int64, element string) (int64, error)
- func (list List) RightPop(ctx context.Context, count int64) ([]string, error)
- func (list List) RightPopLeftPush(ctx context.Context, destination string) (string, error)
- func (list List) RightPush(ctx context.Context, elements ...string) (int64, error)
- func (list List) RightPushX(ctx context.Context, elements ...string) (int64, error)
- func (list List) Set(ctx context.Context, index int64, element string) error
- func (list List) Trim(ctx context.Context, start, stop int64) error
- type PubSub
- func (ps *PubSub) CHANNELS(ctx context.Context, pattern string) ([]string, error)
- func (ps *PubSub) PSUBSCRIBE(ctx context.Context) error
- func (ps *PubSub) PUBLISH(ctx context.Context, msg string) (int64, error)
- func (ps *PubSub) PUBSUB_NUMPAT(ctx context.Context) error
- func (ps *PubSub) PUBSUB_NUMSUB(ctx context.Context) error
- func (ps *PubSub) PUBSUB_SHARDCHANNELS(ctx context.Context) error
- func (ps *PubSub) PUNSUBSCRIBE(ctx context.Context) error
- func (ps *PubSub) SPUBLISH(ctx context.Context) error
- func (ps *PubSub) SSUBSCRIBE(ctx context.Context) error
- func (ps *PubSub) SUBSCRIBE(ctx context.Context) error
- func (ps *PubSub) SUNSUBSCRIBE(ctx context.Context) error
- func (ps *PubSub) UNSUBSCRIBE(ctx context.Context) error
- type PubSubListener
- func (psl *PubSubListener) PING(ctx context.Context) error
- func (psl *PubSubListener) PSUBSCRIBE(ctx context.Context) error
- func (psl *PubSubListener) PUNSUBSCRIBE(ctx context.Context) error
- func (psl *PubSubListener) QUIT(ctx context.Context) error
- func (psl *PubSubListener) RESET(ctx context.Context) error
- func (psl *PubSubListener) SSUBSCRIBE(ctx context.Context) error
- func (psl *PubSubListener) SUBSCRIBE(ctx context.Context) error
- func (psl *PubSubListener) SUNSUBSCRIBE(ctx context.Context) error
- func (psl *PubSubListener) UNSUBSCRIBE(ctx context.Context) error
- type ReaderPool
- type Script
- type Set
- func (set Set) Add(ctx context.Context, members ...string) (int64, error)
- func (set Set) Cardinality(ctx context.Context) (int64, error)
- func (set Set) Diff(ctx context.Context, keys ...string) ([]string, error)
- func (set Set) DiffStore(ctx context.Context, dst string, keys ...string) (int64, error)
- func (set Set) Inter(ctx context.Context, keys ...string) ([]string, error)
- func (set Set) InterStore(ctx context.Context, dst string, keys ...string) (int64, error)
- func (set Set) IsMember(ctx context.Context, member string) (bool, error)
- func (set Set) Members(ctx context.Context) ([]string, error)
- func (set Set) MoveTo(ctx context.Context, dst, member string) (bool, error)
- func (set Set) MultiIsMembers(ctx context.Context, members ...string) ([]bool, error)
- func (set Set) Name() string
- func (set Set) Pop(ctx context.Context) (string, error)
- func (set Set) Pops(ctx context.Context, count int) ([]string, error)
- func (set Set) RandomMember(ctx context.Context) (string, error)
- func (set Set) RandomMembers(ctx context.Context, count int64) ([]string, error)
- func (set Set) Remove(ctx context.Context, members ...string) (int64, error)
- func (set Set) Scan(ctx context.Context, cursor uint64, match string, count int64) (_ []string, _ uint64, _ error)
- func (set Set) Union(ctx context.Context, keys ...string) ([]string, error)
- func (set Set) UnionStore(ctx context.Context, dst string, keys ...string) (int64, error)
- type SortedSet
- func (ss *SortedSet) Add(ctx context.Context, items ...*SortedSetItem) (int64, error)
- func (ss *SortedSet) BlockingPopMax(ctx context.Context) (*SortedSetWithKey, error)
- func (ss *SortedSet) BlockingPopMin(ctx context.Context) (*SortedSetWithKey, error)
- func (ss *SortedSet) Cardinality(ctx context.Context) (int64, error)
- func (ss *SortedSet) Count(ctx context.Context, min, max string) (int64, error)
- func (ss *SortedSet) IncBy(ctx context.Context, delta float64, member string) (float64, error)
- func (ss *SortedSet) IntersectionStore(ctx context.Context, store *SortedSetStore, _ ...string) (int64, error)
- func (ss *SortedSet) LexCount(ctx context.Context, min, max string) (int64, error)
- func (ss *SortedSet) PopMax(ctx context.Context, count ...int64) ([]SortedSetItem, error)
- func (ss *SortedSet) PopMin(ctx context.Context, count ...int64) ([]SortedSetItem, error)
- func (ss *SortedSet) Range(ctx context.Context, start, stop int64) ([]string, error)
- func (ss *SortedSet) RangeByLex(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
- func (ss *SortedSet) RangeByScore(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
- func (ss *SortedSet) Rank(ctx context.Context, member string) (int64, error)
- func (ss *SortedSet) Remove(ctx context.Context, members ...interface{}) (int64, error)
- func (ss *SortedSet) RemoveRangeByLex(ctx context.Context, min, max string) (int64, error)
- func (ss *SortedSet) RemoveRangeByRank(ctx context.Context, start, stop int64) (int64, error)
- func (ss *SortedSet) RemoveRangeByScore(ctx context.Context, min, max string) (int64, error)
- func (ss *SortedSet) ReverseRange(ctx context.Context, start, stop int64) ([]string, error)
- func (ss *SortedSet) ReverseRangeByLex(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
- func (ss *SortedSet) ReverseRangeByScore(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
- func (ss *SortedSet) ReverseRank(ctx context.Context, member string) (int64, error)
- func (ss *SortedSet) Scan(ctx context.Context, cursor uint64, match string, count int64) ([]string, uint64, error)
- func (ss *SortedSet) Score(ctx context.Context, member string) (float64, error)
- func (ss *SortedSet) UnionStore(ctx context.Context, dest string, store *SortedSetStore, _ ...string) (int64, error)
- type SortedSetItem
- type SortedSetRangeBy
- type SortedSetStore
- type SortedSetWithKey
- type Stream
- func (st *Stream) Ack(ctx context.Context, group string, ids ...string) (int64, error)
- func (st *Stream) Add(ctx context.Context, values map[string]Value) (string, error)
- func (st *Stream) AutoClaim(ctx context.Context) (next string, msg StreamMessage, _ error)
- func (st *Stream) Claim(ctx context.Context) ([]StreamMessage, error)
- func (st *Stream) ClaimIDs(ctx context.Context) ([]string, error)
- func (st *Stream) Delete(ctx context.Context, ids ...string) (int64, error)
- func (st *Stream) Get(ctx context.Context, id string) (StreamMessage, error)
- func (st *Stream) Group(ctx context.Context) (int64, error)
- func (st *Stream) Info(ctx context.Context) (int64, error)
- func (st *Stream) Len(ctx context.Context) (int64, error)
- func (st *Stream) Name() string
- func (st *Stream) Pending(ctx context.Context, group string) (*StreamPending, error)
- func (st *Stream) Range(ctx context.Context, start, end string, count int64) ([]StreamMessage, error)
- func (st *Stream) RangeAll(ctx context.Context, start, end string) ([]StreamMessage, error)
- func (st *Stream) Read(ctx context.Context) ([]StreamInfo, error)
- func (st *Stream) ReadGroup(ctx context.Context) ([]StreamInfo, error)
- func (st *Stream) ReverseRange(ctx context.Context, end, start string) ([]StreamMessage, error)
- func (st *Stream) ReverseRangeAll(ctx context.Context, end, start string) ([]StreamMessage, error)
- func (st *Stream) Trim(ctx context.Context, maxLen int64) (int64, error)
- type StreamInfo
- type StreamMessage
- type StreamPending
- type Strings
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitMap ¶
type BitMap struct {
// contains filtered or unexported fields
}
BitMap client for bitmap operations in Redis. See: https://redis.io/commands#bitmap
func (*BitMap) BitCount ¶
BitCount TODO See: https://redis.io/commands/bitcount
func (*BitMap) BitCountAll ¶
BitCountAll returns the number of set bits in a string. See: https://redis.io/commands/bitcount
func (*BitMap) BitField ¶
BitField TODO See: https://redis.io/commands/bitfield
func (*BitMap) BitFieldReadOnly ¶
BitFieldReadOnly TODO See: https://redis.io/commands/bitfield_ro
func (*BitMap) BitOp ¶
BitOp TODO See: https://redis.io/commands/bitop
func (*BitMap) BitPos ¶
BitPos TODO See: https://redis.io/commands/bitpos
func (*BitMap) GetBit ¶
GetBit TODO See: https://redis.io/commands/getbit
type Geo ¶
type Geo struct {
// contains filtered or unexported fields
}
Geo represents a Redis GeoHash structure.
func (*Geo) Add ¶
Add add one or more geospatial items in the geospatial index represented using a sorted set. TODO: XX, NX, CH https://redis.io/commands/geoadd
func (*Geo) Radius ¶
func (g *Geo) Radius(ctx context.Context, longitude, latitude float64, query GeoRadiusQuery) ([]GeoLocation, error)
Radius query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point.
func (*Geo) RadiusByMember ¶
func (g *Geo) RadiusByMember(ctx context.Context, member string, query GeoRadiusQuery) ([]GeoLocation, error)
RadiusByMember query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member.
func (*Geo) Search ¶
Search ... TODO: https://redis.io/commands/geosearch
func (*Geo) SearchStore ¶
SearchStore ... TODO: https://redis.io/commands/geosearchstore
type GeoLocation ¶
type GeoLocation = interface{} // todo redis.GeoLocation
GeoLocation is used with GeoAdd to add geospatial location.
type GeoPos ¶
type GeoPos = interface{} // todo redis.GeoPos
GeoPos is used with GeoPos to add geospatial position.
type GeoRadiusQuery ¶
type GeoRadiusQuery = interface{} // todo redis.GeoRadiusQuery
GeoRadiusQuery is used with GeoRadius to query geospatial index.
type HashMap ¶
type HashMap struct {
// contains filtered or unexported fields
}
HashMap TODO
func (*HashMap) Delete ¶
Delete TODO See: https://redis.io/commands/hdel
func (*HashMap) Exists ¶
Exists TODO See: https://redis.io/commands/hexists
func (*HashMap) Get ¶
Get returns the value associated with field in the hash. See: https://redis.io/commands/hget
func (*HashMap) GetAll ¶
GetAll TODO See: https://redis.io/commands/hgetall
func (*HashMap) IncBy ¶
IncBy TODO See: https://redis.io/commands/hincrby
func (*HashMap) IncByFloat ¶
IncByFloat TODO See: https://redis.io/commands/hincrbyfloat
func (*HashMap) Keys ¶
Keys returns all field names in the hash. See: https://redis.io/commands/hkeys
func (*HashMap) Len ¶
Len returns the number of fields contained in the hash. See: https://redis.io/commands/hlen
func (*HashMap) MultiGet ¶
MultiGet returns the values associated with the specified fields in the hash. See: https://redis.io/commands/hmget
func (*HashMap) MultiSet ¶
MultiSet the specified fields to their respective values in the hash. This command overwrites any specified fields already existing in the hash.
Deprecation notice: as of Redis version 4.0.0 this command is considered as deprecated. While it is unlikely that it will be completely removed, prefer using `HSET` with multiple field-value pairs in its stead.
func (*HashMap) RandomField ¶
func (hm *HashMap) RandomField(ctx context.Context, cursor uint64, match string, count int64) (_ []string, _ uint64, _ error)
RandomField TODO See: https://redis.io/commands/hrandfield
func (*HashMap) Scan ¶
func (hm *HashMap) Scan(ctx context.Context, cursor uint64, match string, count int64) ([]string, uint64, error)
Scan TODO See: https://redis.io/commands/hscan
func (*HashMap) Set ¶
Set field in the hash to value. If set does not exist, a new set is created. If field already exists in the hash, it is overwritten. See: https://redis.io/commands/hset
func (*HashMap) SetNotExist ¶
SetNotExist field in the hash to value, only if field does not yet exist. If set does not exist, a new set is created. If field already exists, this operation has no effect. See: https://redis.io/commands/hsetnx
func (*HashMap) Strlen ¶
Strlen returns the string length of the value associated with field in the hash. If the key or the field do not exist, 0 is returned. See: https://redis.io/commands/hstrlen
type HyperLogLog ¶
type HyperLogLog struct {
// contains filtered or unexported fields
}
HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself).
func NewHyperLogLog ¶
func NewHyperLogLog(name string, client *Client) *HyperLogLog
NewHyperLogLog instantiates new Redis HyperLogLog client.
func (*HyperLogLog) Add ¶
Add the specified elements to the specified HyperLogLog. See: https://redis.io/commands/pfadd
func (*HyperLogLog) Count ¶
func (h *HyperLogLog) Count(ctx context.Context) (int64, error)
Count return the approximated cardinality of the set. See: https://redis.io/commands/pfcount
func (*HyperLogLog) CountWith ¶
CountWith return the approximated cardinality of the sets. See: https://redis.io/commands/pfcount
func (*HyperLogLog) Merge ¶
func (h *HyperLogLog) Merge(ctx context.Context, keys ...string) error
Merge N HyperLogLogs, but with high constant times. See: https://redis.io/commands/pfmerge
func (*HyperLogLog) MergeInto ¶
MergeInto N HyperLogLogs, but with high constant times. See: https://redis.io/commands/pfmerge
type List ¶
type List struct {
// contains filtered or unexported fields
}
List client for list operations in Redis. See: https://redis.io/commands#list
func (List) BlockingLeftMove ¶
BlockingLeftMove TODO See: https://redis.io/commands/blmove
func (List) BlockingLeftMultiPop ¶
BlockingLeftMultiPop TODO See: https://redis.io/commands/blmpop
func (List) BlockingLeftPop ¶
BlockingLeftPop TODO See: https://redis.io/commands/blpop
func (List) BlockingRightPop ¶
BlockingRightPop TODO See: https://redis.io/commands/brpop
func (List) BlockingRightPopLeftPush ¶
BlockingRightPopLeftPush TODO See: https://redis.io/commands/brpoplpush
func (List) Index ¶
Index returns the element at index index in the list. See: https://redis.io/commands/lindex
func (List) Insert ¶
Insert element in the list either before or after the reference value pivot. See: https://redis.io/commands/linsert
func (List) LeftMove ¶
LeftMove atomically returns and removes the first/last element (head/tail depending on the wherefrom argument) of the list and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination. Returns the element being popped and pushed.
func (List) LeftMultiPop ¶
LeftMultiPop TODO See: https://redis.io/commands/lmpop
func (List) LeftPop ¶
LeftPop removes and returns the first elements of the list. See: https://redis.io/commands/lpop
func (List) LeftPos ¶
LeftPos TODO See: https://redis.io/commands/lpos
func (List) LeftPush ¶
LeftPush insert all the specified values at the head of the list. Returns the length of the list after the push operation.
func (List) LeftPushX ¶
LeftPushX inserts specified values at the head of the list, only if list already exists. In contrary to LPUSH, no operation will be performed when key does not yet exist. Returns the length of the list after the push operation.
func (List) Len ¶
Len returns the length of the list. See: https://redis.io/commands/llen
func (List) Range ¶
Range returns the specified elements of the list. See: https://redis.io/commands/lrange
func (List) Remove ¶
Remove the first count occurrences of elements equal to element from the list. See: https://redis.io/commands/lrem
func (List) RightPop ¶
RightPop removes and returns the last elements of the list. See: https://redis.io/commands/rpop
func (List) RightPopLeftPush ¶
RightPopLeftPush atomically returns and removes the last element (tail) of the list stored and pushes the element at the first element (head) of the list stored at destination. Returns the element being popped and pushed.
func (List) RightPush ¶
RightPush insert all the specified values at the tail of the list. Returns the length of the list after the push operation.
func (List) RightPushX ¶
RightPushX inserts specified values at the tail of the list, only if list already exists. In contrary to RPUSH, no operation will be performed when key does not yet exist. Returns the length of the list after the push operation.
func (List) Set ¶
Set the list element at index to element. See: https://redis.io/commands/lset
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub TODO See: https://redis.io/topics/pubsub
func (*PubSub) CHANNELS ¶
CHANNELS TODO See: https://redis.io/commands/pubsub-channels
func (*PubSub) PUBLISH ¶
PUBLISH TODO See: https://redis.io/commands/publish
func (*PubSub) PUBSUB_SHARDCHANNELS ¶
type PubSubListener ¶
type PubSubListener struct{}
func (*PubSubListener) PSUBSCRIBE ¶
func (psl *PubSubListener) PSUBSCRIBE(ctx context.Context) error
func (*PubSubListener) PUNSUBSCRIBE ¶
func (psl *PubSubListener) PUNSUBSCRIBE(ctx context.Context) error
func (*PubSubListener) SSUBSCRIBE ¶
func (psl *PubSubListener) SSUBSCRIBE(ctx context.Context) error
func (*PubSubListener) SUNSUBSCRIBE ¶
func (psl *PubSubListener) SUNSUBSCRIBE(ctx context.Context) error
func (*PubSubListener) UNSUBSCRIBE ¶
func (psl *PubSubListener) UNSUBSCRIBE(ctx context.Context) error
type ReaderPool ¶
type ReaderPool struct {
// contains filtered or unexported fields
}
ReaderPool contains logic of *bufio.Reader reuse with various size.
func NewReaderPool ¶
func NewReaderPool(min, max int) *ReaderPool
NewReaderPool creates new ReaderPool that reuses writers which size is in logarithmic range [min, max].
func (*ReaderPool) Put ¶
func (rp *ReaderPool) Put(br *bufio.Reader)
Put takes ownership of bufio.Reader for further reuse.
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set represents a Redis Set structure.
func (Set) Add ¶
Add one or more members to a set. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. Returns the number of elements that were added to the set, not including all the elements already present in the set.
func (Set) Cardinality ¶
Cardinality returns the number of members in a set. See: https://redis.io/commands/scard
func (Set) Diff ¶
Diff subtract multiple sets. See: https://redis.io/commands/sdiff
func (Set) DiffStore ¶
DiffStore subtract multiple sets and store the resulting set in a key. See: https://redis.io/commands/sdiffstore
func (Set) Inter ¶
Inter intersect multiple sets. See: https://redis.io/commands/sinter
func (Set) InterStore ¶
InterStore intersect multiple sets and store the resulting set in a key. See: https://redis.io/commands/sinterstore
func (Set) IsMember ¶
IsMember returns if member is a member of the set. See: https://redis.io/commands/sismember
func (Set) Members ¶
Members returns all the members in a set. See: https://redis.io/commands/smembers
func (Set) MoveTo ¶
Move a member from one set to another (dst). See: https://redis.io/commands/smove
func (Set) MultiIsMembers ¶
MultiIsMembers returns whether each member is a member of the set. See: https://redis.io/commands/smismember
func (Set) Pop ¶
Pop removes and returns one random members from a set. See: https://redis.io/commands/spop
func (Set) Pops ¶
Pops removes and returns one or multiple random members from a set. See: https://redis.io/commands/spop
func (Set) RandomMember ¶
RandomMember gets one random member from a set. See: https://redis.io/commands/srandmember
func (Set) RandomMembers ¶
RandomMembers gets one random member from a set. See: https://redis.io/commands/srandmember
func (Set) Remove ¶
Remove one or more members from a set. See: https://redis.io/commands/srem
func (Set) Scan ¶
func (set Set) Scan(ctx context.Context, cursor uint64, match string, count int64) (_ []string, _ uint64, _ error)
Scan incrementally iterate Set elements. See: https://redis.io/commands/sscan
func (Set) Union ¶
Union add multiple sets. See: https://redis.io/commands/sunion
func (Set) UnionStore ¶
UnionStore add multiple sets and store the resulting set in a key. See: https://redis.io/commands/sunionstore
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
SortedSet ...
func NewSortedSet ¶
NewSortedSet instantiates a new SortedSet structure client for Redis.
func (*SortedSet) BlockingPopMax ¶
func (ss *SortedSet) BlockingPopMax(ctx context.Context) (*SortedSetWithKey, error)
BlockingPopMax ...
func (*SortedSet) BlockingPopMin ¶
func (ss *SortedSet) BlockingPopMin(ctx context.Context) (*SortedSetWithKey, error)
BlockingPopMin ...
func (*SortedSet) Cardinality ¶
Cardinality ...
func (*SortedSet) IntersectionStore ¶
func (ss *SortedSet) IntersectionStore(ctx context.Context, store *SortedSetStore, _ ...string) (int64, error)
IntersectionStore ...
func (*SortedSet) RangeByLex ¶
RangeByLex ...
func (*SortedSet) RangeByScore ¶
RangeByScore ...
func (*SortedSet) RemoveRangeByLex ¶
RemoveRangeByLex ...
func (*SortedSet) RemoveRangeByRank ¶
RemoveRangeByRank ...
func (*SortedSet) RemoveRangeByScore ¶
RemoveRangeByScore ...
func (*SortedSet) ReverseRange ¶
ReverseRange ...
func (*SortedSet) ReverseRangeByLex ¶
func (ss *SortedSet) ReverseRangeByLex(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
ReverseRangeByLex ...
func (*SortedSet) ReverseRangeByScore ¶
func (ss *SortedSet) ReverseRangeByScore(ctx context.Context, opt *SortedSetRangeBy) ([]string, error)
ReverseRangeByScore ...
func (*SortedSet) ReverseRank ¶
ReverseRank ...
func (*SortedSet) Scan ¶
func (ss *SortedSet) Scan(ctx context.Context, cursor uint64, match string, count int64) ([]string, uint64, error)
Scan ...
func (*SortedSet) UnionStore ¶
func (ss *SortedSet) UnionStore(ctx context.Context, dest string, store *SortedSetStore, _ ...string) (int64, error)
UnionStore ...
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream TODO See: https://redis.io/topics/streams-intro
func (*Stream) Ack ¶
Ack ... See: https://redis.io/commands/xack
func (*Stream) Add ¶
Add ... See: https://redis.io/commands/xadd
func (*Stream) AutoClaim ¶
AutoClaim ... See: https://redis.io/commands/xautoclaim
func (*Stream) Claim ¶
func (st *Stream) Claim(ctx context.Context) ([]StreamMessage, error)
Claim ...
func (*Stream) Delete ¶
Delete the specified entries from a stream, and returns the number of entries deleted. See: https://redis.io/commands/xdel
func (*Stream) Get ¶
Get the item by id from stream. This operation is not directly supported by Redis, it is a wrapper for XRANGE. See: https://redis.io/commands/xrange#fetching-single-items
func (*Stream) Group ¶
Group ... XGROUP CREATE XGROUP CREATECONSUMER XGROUP DELCONSUMER XGROUP DESTROY XGROUP SETID
func (*Stream) Len ¶
Len кeturns the number of entries inside a stream. See: https://redis.io/commands/xlen
func (*Stream) Range ¶
func (st *Stream) Range(ctx context.Context, start, end string, count int64) ([]StreamMessage, error)
Range ... TODO: add start/end validation
func (*Stream) ReadGroup ¶
func (st *Stream) ReadGroup(ctx context.Context) ([]StreamInfo, error)
ReadGroup ...
func (*Stream) ReverseRange ¶
ReverseRange ...
func (*Stream) ReverseRangeAll ¶
ReverseRange ... https://redis.io/commands/xrevrange
type StreamMessage ¶
type StreamPending ¶
StreamPending ...
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
func NewStrings ¶
func (Strings) Get ¶
Get TODO See: https://redis.io/commands/get