Documentation
¶
Index ¶
- type Element
- type Level
- type Node
- type ScoreBorder
- type SortedSet
- func (sortedSet *SortedSet) Add(member string, score float64) bool
- func (sortedSet *SortedSet) Count(min *ScoreBorder, max *ScoreBorder) int64
- func (sortedSet *SortedSet) ForEach(start int64, stop int64, desc bool, consumer func(element *Element) bool)
- func (sortedSet *SortedSet) ForEachByScore(min *ScoreBorder, max *ScoreBorder, offset int64, limit int64, desc bool, ...)
- func (sortedSet *SortedSet) Get(member string) (element *Element, ok bool)
- func (sortedSet *SortedSet) GetRank(member string, desc bool) (rank int64)
- func (sortedSet *SortedSet) Len() int64
- func (sortedSet *SortedSet) Range(start int64, stop int64, desc bool) []*Element
- func (sortedSet *SortedSet) RangeByScore(min *ScoreBorder, max *ScoreBorder, offset int64, limit int64, desc bool) []*Element
- func (sortedSet *SortedSet) Remove(member string) bool
- func (sortedSet *SortedSet) RemoveByRank(start int64, stop int64) int64
- func (sortedSet *SortedSet) RemoveByScore(min *ScoreBorder, max *ScoreBorder) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScoreBorder ¶
func ParseScoreBorder ¶
func ParseScoreBorder(s string) (*ScoreBorder, error)
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
func (*SortedSet) Count ¶
func (sortedSet *SortedSet) Count(min *ScoreBorder, max *ScoreBorder) int64
func (*SortedSet) ForEach ¶
func (sortedSet *SortedSet) ForEach(start int64, stop int64, desc bool, consumer func(element *Element) bool)
*
- traverse [start, stop), 0-based rank
func (*SortedSet) ForEachByScore ¶
func (sortedSet *SortedSet) ForEachByScore(min *ScoreBorder, max *ScoreBorder, offset int64, limit int64, desc bool, consumer func(element *Element) bool)
func (*SortedSet) Range ¶
*
- return [start, stop), 0-based rank
- assert start in [0, size), stop in [start, size]
func (*SortedSet) RangeByScore ¶
func (sortedSet *SortedSet) RangeByScore(min *ScoreBorder, max *ScoreBorder, offset int64, limit int64, desc bool) []*Element
* param limit: <0 means no limit
func (*SortedSet) RemoveByRank ¶
* 0-based rank, [start, stop)
func (*SortedSet) RemoveByScore ¶
func (sortedSet *SortedSet) RemoveByScore(min *ScoreBorder, max *ScoreBorder) int64
Click to show internal directories.
Click to hide internal directories.