Documentation ¶
Index ¶
- Constants
- func BytesToInt(b []byte) int
- func BytesToInt64(b []byte) int64
- func GetRealSizeOf(data interface{}) int
- func Int64ToBytes(n int64) []byte
- func IntToBytes(n int) []byte
- func Next2Power(num uint) uint
- func SetIfHitLimit(param int, min int, max int) int
- type Bitmap
- func (bitmap *Bitmap) BitCount(start int, end int) int
- func (bitmap *Bitmap) Cap() int
- func (bitmap *Bitmap) Clear(num int)
- func (bitmap *Bitmap) Has(num int) bool
- func (bitmap *Bitmap) Len() int
- func (bitmap *Bitmap) MemoryUsage() int
- func (bitmap *Bitmap) Set(num int)
- func (bitmap *Bitmap) String() string
- func (bitmap *Bitmap) Value() []uint64
- type BloomFilter
- func (f *BloomFilter) Add(data string)
- func (f *BloomFilter) ClearAll() *BloomFilter
- func (f *BloomFilter) EstimateFalsePositiveRate(n uint) (fpRate float64)
- func (f *BloomFilter) MemoryUsage() int
- func (f *BloomFilter) Size() uint64
- func (f *BloomFilter) Test(data string) bool
- func (f *BloomFilter) Value() *BloomView
- type BloomView
- type DSType
- type Set
- type SkipList
- type SlElement
Constants ¶
View Source
const ( StringDS = iota CounterDS ObjectDS ListDS ZListDS SetDS BitmapDS BloomFilterDS LockDS )
Variables ¶
This section is empty.
Functions ¶
func BytesToInt ¶
func BytesToInt64 ¶
func GetRealSizeOf ¶ added in v0.0.7
func GetRealSizeOf(data interface{}) int
func Int64ToBytes ¶
func IntToBytes ¶
func Next2Power ¶
Types ¶
type Bitmap ¶
type Bitmap struct {
// contains filtered or unexported fields
}
func NewBitmapWithCap ¶
NewBitmapWithCap cap's unit is [bit]
func (*Bitmap) MemoryUsage ¶ added in v0.0.7
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
func NewBloomFilter ¶
func NewBloomFilter(m, k uint64) *BloomFilter
func NewBloomFilterByView ¶
func NewBloomFilterByView(view *BloomView) *BloomFilter
func NewBloomFilterWithEstimates ¶
func NewBloomFilterWithEstimates(n uint, fp float64) *BloomFilter
func (*BloomFilter) Add ¶
func (f *BloomFilter) Add(data string)
func (*BloomFilter) ClearAll ¶
func (f *BloomFilter) ClearAll() *BloomFilter
func (*BloomFilter) EstimateFalsePositiveRate ¶
func (f *BloomFilter) EstimateFalsePositiveRate(n uint) (fpRate float64)
func (*BloomFilter) MemoryUsage ¶ added in v0.0.7
func (f *BloomFilter) MemoryUsage() int
func (*BloomFilter) Size ¶
func (f *BloomFilter) Size() uint64
func (*BloomFilter) Value ¶
func (f *BloomFilter) Value() *BloomView
type SkipList ¶
type SkipList struct {
// contains filtered or unexported fields
}
func NewSkipList ¶
func NewSkipList() *SkipList
Click to show internal directories.
Click to hide internal directories.