dedup

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath added in v1.9.0

func DefaultPath() string

DefaultPath returns the default path for the deduplication service's badger DB

Types

type Dedup added in v1.9.0

type Dedup interface {
	// Set returns [true] if it was the first time the key was encountered, otherwise it returns [false] along with the previous value
	Set(kv KeyValue) (bool, int64)

	// Commit commits a list of previously set keys to the DB
	Commit(keys []string) error

	// Close closes the deduplication service
	Close()
}

Dedup is the interface for deduplication service

func New

func New(path string) Dedup

New creates a new deduplication service. The service needs to be closed after use.

type KeyValue added in v1.9.0

type KeyValue struct {
	Key   string
	Value int64
}

type OptFn

type OptFn func(*badgerDB)

Jump to

Keyboard shortcuts

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