bloom

package
v0.0.0-...-b08fcc5 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTooLargeOffset = errors.New("too large offset")

ErrTooLargeOffset indicates the offset is too large in bitset.

Functions

This section is empty.

Types

type Filter

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

A Filter is a bloom filter.

func New

func New(store *redis.Client, key string, bits uint) *Filter

func (*Filter) Add

func (f *Filter) Add(ctx context.Context, data []byte) error

Add adds data into f.

func (*Filter) Exists

func (f *Filter) Exists(ctx context.Context, data []byte) (bool, error)

Exists checks if data is in f.

Jump to

Keyboard shortcuts

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