Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomFilter ¶ added in v3.5.3
type BloomFilter struct {
// contains filtered or unexported fields
}
BloomFilter implements the Filter interface using a bloom filter so that mostly unique items get through the filter.
func NewBloomFilter ¶ added in v3.5.3
func NewBloomFilter(num int64) *BloomFilter
NewBloomFilter returns an initialized BloomFilter.
func (*BloomFilter) Duplicate ¶ added in v3.5.3
func (r *BloomFilter) Duplicate(s string) bool
Duplicate implements the Filter interface.
func (*BloomFilter) Has ¶ added in v3.5.3
func (r *BloomFilter) Has(s string) bool
Has implements the Filter interface.
type Filter ¶ added in v3.5.3
type Filter interface { // Duplicate checks if the name provided has been seen before by this filter. // If not, the string is added to the filter. Duplicate(s string) bool // Has returns true if the receiver StringFilter already contains the string argument. Has(s string) bool }
Filter is the object type for performing string filtering.
type StringFilter ¶
StringFilter implements the Filter interface using a Set so that only unique items get through the filter.
func NewStringFilter ¶
func NewStringFilter() *StringFilter
NewStringFilter returns an initialized StringFilter.
func (*StringFilter) Duplicate ¶
func (r *StringFilter) Duplicate(s string) bool
Duplicate implements the Filter interface.
func (*StringFilter) Has ¶ added in v3.5.3
func (r *StringFilter) Has(s string) bool
Has implements the Filter interface.
Click to show internal directories.
Click to hide internal directories.