bloomlive

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	*bloom.BloomFilter
	// contains filtered or unexported fields
}

T implements a liveset.Liveset using a concrete bloom filter. The bloom filter stores each digest according to its bytewise representation.

func New

func New(b *bloom.BloomFilter) *T

New creates a new T from a bloom filter.

func (*T) Contains

func (b *T) Contains(d digest.Digest) bool

Contains tells whether the digest d is definitely in the set. Contains is not safe to call concurrently.

func (*T) MarshalJSON

func (b *T) MarshalJSON() ([]byte, error)

MarshalJSON serializes the liveset into JSON.

func (*T) UnmarshalJSON

func (b *T) UnmarshalJSON(p []byte) error

UnmarshalJSON deserializes the liveset from JSON.

Jump to

Keyboard shortcuts

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