hashdb

package
v0.0.0-...-3cef9f2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const HashPrefix = "hash/"
View Source
const SmallHashsetSuffix = ".hs"
View Source
const SmallHashsetThreshold = 64 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(backend backends.Backend) *DB

func Open

func Open(ctx context.Context, backend backends.Backend) (*DB, error)

func (*DB) Close

func (d *DB) Close() error

func (*DB) Coalesce

func (d *DB) Coalesce(ctx context.Context) error

func (*DB) Flush

func (d *DB) Flush(ctx context.Context) error

func (*DB) Has

func (d *DB) Has(ctx context.Context, hash string) (exists bool, err error)

func (*DB) Iterate

func (d *DB) Iterate(ctx context.Context, cb func(ctx context.Context, hash, hashset string, data *manifest.Stream) error) error

func (*DB) Lookup

func (d *DB) Lookup(ctx context.Context, hash string) (*manifest.Stream, error)

func (*DB) Put

func (d *DB) Put(ctx context.Context, hash string, data *manifest.Stream) error

func (*DB) Split

func (d *DB) Split(ctx context.Context) error

Jump to

Keyboard shortcuts

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