hashdb

package
v0.0.0-...-ab16c52 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 11 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 interface {
	Close() error
	Coalesce(context.Context) error
	Flush(context.Context) error
	Has(ctx context.Context, hash string) (exists bool, err error)
	Iterate(context.Context,
		func(ctx context.Context, hash, hashset string, data *manifest.Stream) error) error
	Lookup(ctx context.Context, hash string) (*manifest.Stream, error)
	Put(ctx context.Context, hash string, data *manifest.Stream) error
	Split(context.Context) error
}

func AsyncHashDB

func AsyncHashDB(ctx context.Context, constructor func(context.Context) (DB, error)) DB

func New

func New(backend backends.Backend) DB

func Open

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

Jump to

Keyboard shortcuts

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