filter

package
v0.0.0-...-7d20a79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Update([]byte)
	Contains([]byte) bool
	ContainsOrUpdate([]byte) bool
}

type ShardedBloomFilter

type ShardedBloomFilter struct {
	sync.Mutex
	Filters []*bloom.BloomFilter
	Timer   *time.Ticker
	// contains filtered or unexported fields
}

func NewShardedBFilter

func NewShardedBFilter(n uint, p float64, nfb uint, flush time.Duration) (*ShardedBloomFilter, error)

func (*ShardedBloomFilter) Contains

func (f *ShardedBloomFilter) Contains(key []byte) bool

func (*ShardedBloomFilter) ContainsOrUpdate

func (f *ShardedBloomFilter) ContainsOrUpdate(key []byte) bool

func (*ShardedBloomFilter) Update

func (f *ShardedBloomFilter) Update(key []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL