Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomConfig ¶
type BloomConfig func(*BloomFilter)
func WithHashers ¶
func WithHashers(hashers []hash.Hash) BloomConfig
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
BloomFilter represents a Bloom Filter data structure.
func NewBloomFilter ¶
func NewBloomFilter(config ...BloomConfig) *BloomFilter
NewBloomFilter creates and returns a new BloomFilter instance.
func (*BloomFilter) Add ¶
func (bf *BloomFilter) Add(token string)
Add inserts a token into the Bloom Filter.
func (*BloomFilter) Test ¶
func (bf *BloomFilter) Test(token string) bool
Test checks if a token is possibly in the Bloom Filter.
Click to show internal directories.
Click to hide internal directories.