Documentation ¶
Index ¶
- type SortedSet
- func (z *SortedSet) Delete(key int64) (ok bool)
- func (z *SortedSet) GetData(key int64) (data interface{}, ok bool)
- func (z *SortedSet) GetDataByRank(rank int64, reverse bool) (key int64, score float64, data interface{})
- func (z *SortedSet) GetRank(key int64, reverse bool) (rank int64, score float64, data interface{})
- func (z *SortedSet) IncrBy(score float64, key int64) (float64, interface{})
- func (z *SortedSet) Length() int64
- func (z *SortedSet) Range(start, end int64, f func(float64, int64, interface{}))
- func (z *SortedSet) RevRange(start, end int64, f func(float64, int64, interface{}))
- func (z *SortedSet) Set(score float64, key int64, dat interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
SortedSet is the final exported sorted set we can use
func (*SortedSet) GetDataByRank ¶
func (z *SortedSet) GetDataByRank(rank int64, reverse bool) (key int64, score float64, data interface{})
GetDataByRank returns the id,score and extra data of an element which found by position in the rank. The parameter rank is the position, reverse says if in the descend rank.
func (*SortedSet) GetRank ¶
GetRank returns position,score and extra data of an element which found by the parameter key. The parameter reverse determines the rank is descent or ascend, true means descend and false means ascend.
Click to show internal directories.
Click to hide internal directories.