Documentation ¶
Index ¶
- Variables
- func DefaultHash(cap uint, seed uint, value string) uint
- type BloomFilter
- type BloomSet
- type CuckooFilter
- func (cf *CuckooFilter) Count() uint
- func (cf *CuckooFilter) Delete(data []byte) bool
- func (cf *CuckooFilter) Encode() []byte
- func (cf *CuckooFilter) Insert(data []byte) bool
- func (cf *CuckooFilter) InsertUnique(data []byte) bool
- func (cf *CuckooFilter) Lookup(data []byte) bool
- func (cf *CuckooFilter) Reset()
- type RedisSet
- type Set
Constants ¶
This section is empty.
Variables ¶
View Source
var Exists = struct{}{}
Functions ¶
Types ¶
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
func NewBloomFilter ¶
func (*BloomFilter) Add ¶
func (bf *BloomFilter) Add(value string)
func (*BloomFilter) Contains ¶
func (bf *BloomFilter) Contains(value string) bool
type CuckooFilter ¶
type CuckooFilter struct {
// contains filtered or unexported fields
}
func Decode ¶
func Decode(bytes []byte) (*CuckooFilter, error)
func NewFilter ¶
func NewFilter(capacity uint) *CuckooFilter
func (*CuckooFilter) Count ¶
func (cf *CuckooFilter) Count() uint
func (*CuckooFilter) Delete ¶
func (cf *CuckooFilter) Delete(data []byte) bool
Delete data from counter if exists and return if deleted or not
func (*CuckooFilter) Encode ¶
func (cf *CuckooFilter) Encode() []byte
func (*CuckooFilter) Insert ¶
func (cf *CuckooFilter) Insert(data []byte) bool
Insert inserts data into the counter and returns true upon success
func (*CuckooFilter) InsertUnique ¶
func (cf *CuckooFilter) InsertUnique(data []byte) bool
InsertUnique inserts data into the counter if not exists and returns true upon success
func (*CuckooFilter) Lookup ¶
func (cf *CuckooFilter) Lookup(data []byte) bool
Lookup returns true if data is in the counter
type RedisSet ¶
type RedisSet struct {
// contains filtered or unexported fields
}
func NewRedisSet ¶
func (*RedisSet) ContainAll ¶
Click to show internal directories.
Click to hide internal directories.