Documentation
¶
Index ¶
- type Element
- type Level
- type SortedSet
- func (sortedSet *SortedSet) Add(member string, score int64, value interface{})
- func (sortedSet *SortedSet) ForEachByScore(min int64, max int64, offset int64, limit int64, desc bool, ...)
- func (sortedSet *SortedSet) Get(member string) (element *Element, ok bool)
- func (sortedSet *SortedSet) Len() int64
- func (sortedSet *SortedSet) MapLen() int64
- func (sortedSet *SortedSet) RangeByScore(min int64, max int64, offset int64, limit int64, desc bool) []*Element
- func (sortedSet *SortedSet) Remove(member string)
- func (sortedSet *SortedSet) RemoveByRank(start int64, stop int64) int64
- func (sortedSet *SortedSet) RemoveByScore(max int64) int64
- func (sortedSet *SortedSet) SLen() int32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct {
//Member string
Score int64
Value interface{}
}
Element is a key-score pair
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
func (*SortedSet) ForEachByScore ¶
func (sortedSet *SortedSet) ForEachByScore(min int64, max int64, offset int64, limit int64, desc bool, consumer func(node *node) bool)
ForEachByScore visits members which score within the given border
func (*SortedSet) RangeByScore ¶
func (sortedSet *SortedSet) RangeByScore(min int64, max int64, offset int64, limit int64, desc bool) []*Element
RangeByScore returns members which score within the given border param limit: <0 means no limit
func (*SortedSet) RemoveByRank ¶
RemoveByRank removes member ranking within [start, stop) sort by ascending order and rank starts from 0
func (*SortedSet) RemoveByScore ¶
RemoveByScore removes members which timestamp < now time
Click to show internal directories.
Click to hide internal directories.