rotate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package rotate implements a sliding set of three BloomFilters: `previous`, `current` and `next` and the BloomFilter interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCompressor

func SetCompressor(c Compressor)

Types

type BloomFilter

type BloomFilter struct {
	Previous, Current, Next *filter.BloomFilter
	Config                  Config
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, cfg Config) *BloomFilter

func (*BloomFilter) Add

func (bs *BloomFilter) Add(elem []byte)

func (*BloomFilter) Check

func (bs *BloomFilter) Check(elem []byte) bool

func (*BloomFilter) Close

func (bs *BloomFilter) Close()

func (*BloomFilter) MarshalBinary

func (bs *BloomFilter) MarshalBinary() ([]byte, error)

func (*BloomFilter) Union

func (bs *BloomFilter) Union(that interface{}) (float64, error)

func (*BloomFilter) UnmarshalBinary

func (bs *BloomFilter) UnmarshalBinary(data []byte) error

type Compressor

type Compressor interface {
	NewWriter(io.Writer) io.WriteCloser
	NewReader(io.Reader) (io.Reader, error)
}

type Config

type Config struct {
	go_bloom_filter.Config
	TTL uint
}

type Gzip

type Gzip int

func (*Gzip) NewReader

func (g *Gzip) NewReader(r io.Reader) (io.Reader, error)

func (*Gzip) NewWriter

func (g *Gzip) NewWriter(w io.Writer) io.WriteCloser

type SerializableBloomFilter

type SerializableBloomFilter struct {
	Previous, Current, Next *filter.BloomFilter
	Config                  Config
}

Jump to

Keyboard shortcuts

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