Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DupeMap ¶
type DupeMap struct {
// contains filtered or unexported fields
}
TODO: DupeMap should deal with value bytes.Buffer rather than pointers as it is not supposed to mutate the struct.
func NewDupeMap ¶
NewDupeMap creates new dupemap instance. Expire is number of seconds.
func NewDupeMapDefault ¶ added in v0.4.0
func NewDupeMapDefault() *DupeMap
NewDupeMapDefault returns a dupemap instance with default config.
func (*DupeMap) HasAnywhere ¶ added in v0.4.0
HasAnywhere tests if any of Cuckoo Filters (a filter per round) knows already this payload. Similarly to Bloom Filters, False positive matches are possible, but false negatives are not. In addition, it also resets all expired items.
type TmpMap ¶
type TmpMap struct {
// contains filtered or unexported fields
}
func (*TmpMap) Add ¶
Add the hash of a buffer to the blacklist. Returns true if the element was added. False otherwise.
func (*TmpMap) CleanExpired ¶ added in v0.4.0
func (t *TmpMap) CleanExpired()
CleanExpired resets all cache instances that has expired.