bloom

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type BloomFilter

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

func (*BloomFilter) Add

func (bf *BloomFilter) Add(h1, h2 uint64)

func (*BloomFilter) Contains

func (bf *BloomFilter) Contains(h1, h2 uint64) bool

type Database

type Database[T any] struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase[T any](_ map[string]string) (*Database[T], error)

func (*Database[T]) Close

func (b *Database[T]) Close() error

Close satisfies Database. The bloom backend owns no external resources.

func (*Database[T]) Create

func (b *Database[T]) Create(tableName string, config map[string]database.Config) error

func (*Database[T]) DeleteTable

func (b *Database[T]) DeleteTable(tableName string) error

func (*Database[T]) GetTable

func (b *Database[T]) GetTable(tableName string, _ T) (database.Table[T], error)

type Table

type Table[T any] struct {
	// contains filtered or unexported fields
}

func (*Table[T]) Del

func (t *Table[T]) Del(val T, _ []string, _ time.Duration) error

func (*Table[T]) Get

func (t *Table[T]) Get(val T, _ []string, _ database.Options, _ time.Duration) ([]T, error)

func (*Table[T]) Ins

func (t *Table[T]) Ins(val T, _ time.Duration) error

func (*Table[T]) Set

func (t *Table[T]) Set(old, updated T, _, _ []string, _ time.Duration) error

Entries are keyed by primary key, so the field lists do not apply: old supplies the key and updated the whole stored value. A changed key moves the entry, which also re-registers it in the filter.

Jump to

Keyboard shortcuts

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