bloom

package
Version: v0.0.0-...-f6167e3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: BSD-3-Clause Imports: 3 Imported by: 14

Documentation

Overview

Package bloom implements Bloom filters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterPolicy

type FilterPolicy int

FilterPolicy implements the FilterPolicy interface from the pebble package.

The integer value is the approximate number of bits used per key. A good value is 10, which yields a filter with ~ 1% false positive rate.

It is valid to use the other API in this package (pebble/bloom) without using this type or the pebble package.

func (FilterPolicy) MayContain

func (p FilterPolicy) MayContain(ftype base.FilterType, f, key []byte) bool

MayContain implements the pebble.FilterPolicy interface.

func (FilterPolicy) Name

func (p FilterPolicy) Name() string

Name implements the pebble.FilterPolicy interface.

func (FilterPolicy) NewWriter

func (p FilterPolicy) NewWriter(ftype base.FilterType) base.FilterWriter

NewWriter implements the pebble.FilterPolicy interface.

Source Files

Jump to

Keyboard shortcuts

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