Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooLargeOffset = errors.New("too large offset")
ErrTooLargeOffset indicates the offset is too large in bitset.
Functions ¶
This section is empty.
Types ¶
type Filter ¶ added in v1.1.5
type Filter struct {
// contains filtered or unexported fields
}
A Filter is a bloom filter.
func New ¶
New create a Filter, store is the backed redis, key is the key for the bloom filter, bits is how many bits will be used, maps is how many hashes for each addition. best practices: elements - means how many actual elements when maps = 14, formula: 0.7*(bits/maps), bits = 20*elements, the error rate is 0.000067 < 1e-4 for detailed error rate table, see http://pages.cs.wisc.edu/~cao/papers/summary-cache/node8.html
Click to show internal directories.
Click to hide internal directories.