bloom

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashBytes

func HashBytes(key []byte, buckets int32, h jump.KeyHasher) int32

Types

type BloomFilter

type BloomFilter struct {
	// contains filtered or unexported fields
}

func NewBloomFilter

func NewBloomFilter(n uint, fp float64, numOfBuckets int, keyPrefixes ...[]byte) *BloomFilter

func (*BloomFilter) Add

func (b *BloomFilter) Add(_ context.Context, key []byte)

func (*BloomFilter) Clear

func (b *BloomFilter) Clear(_ context.Context, store bond.FilterStorer) error

func (*BloomFilter) Load

func (b *BloomFilter) Load(_ context.Context, store bond.FilterStorer) error

func (*BloomFilter) MayContain

func (b *BloomFilter) MayContain(_ context.Context, key []byte) bool

func (*BloomFilter) Save

func (b *BloomFilter) Save(_ context.Context, store bond.FilterStorer) error

Jump to

Keyboard shortcuts

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