bucketteer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Version = uint64(2)

Variables

View Source
var ErrNotFound = fmt.Errorf("not found")

Functions

func Hash

func Hash(sig [64]byte) uint64

func Magic

func Magic() [8]byte

Types

type Reader

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

func NewReader

func NewReader(reader io.ReaderAt) (*Reader, error)

func Open

func Open(path string) (*Reader, error)

Open opens a Bucketteer file in read-only mode, using memory-mapped IO.

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Has

func (r *Reader) Has(sig [64]byte) (bool, error)

func (*Reader) Meta

func (r *Reader) Meta() *indexmeta.Meta

type Writer

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

func NewWriter

func NewWriter(path string) (*Writer, error)

func (*Writer) Close

func (b *Writer) Close() error

func (*Writer) Has

func (b *Writer) Has(sig [64]byte) bool

Has returns true if the Bucketteer has seen the given signature.

func (*Writer) Put

func (b *Writer) Put(sig [64]byte)

Put adds the given signature to the Bucketteer. Cannot be called concurrently.

func (*Writer) Seal

func (b *Writer) Seal(meta indexmeta.Meta) (int64, error)

Seal writes the Bucketteer's state to the given writer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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