filter

package
v1.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	Alloc(n int) []byte
	Write(p []byte) (n int, err error)
	WriteByte(c byte) error
}

Buffer is the interface that wraps basic Alloc, Write and WriteByte methods.

type Filter

type Filter interface {
	Name() string
	NewGenerator() FilterGenerator
	Contains(filter, key []byte) bool
}

Filter is the filter.

func NewBloomFilter

func NewBloomFilter(bitsPerKey int) Filter

NewBloomFilter creates a new initialized bloom filter for given

type FilterGenerator

type FilterGenerator interface {
	Add(key []byte)
	Generate(b Buffer)
}

FilterGenerator is the filter generator.

Jump to

Keyboard shortcuts

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