boltindex

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = false
)
View Source
var (
	ErrBatcherClosed = errors.New("batcher closed")
)

Functions

This section is empty.

Types

type Index

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

Index represent a diff-index backed by a bolt store.

It's intended for indexing and/or for ONE diff operation (if recording seen keys). Many instances can work in parallel on the same store.

func New

func New(db *bolt.DB, bucket []byte, recordSeen bool) (idx *Index, err error)

func (*Index) Cleanup

func (i *Index) Cleanup() (err error)

Cleanup removes temp data produced by this index

func (*Index) Compare

func (i *Index) Compare(kv KeyValue) (result diff.CompareResult, err error)

func (*Index) DoesRecordValues

func (i *Index) DoesRecordValues() bool

func (*Index) Index

func (i *Index) Index(kvs <-chan KeyValue, resumeKey <-chan []byte) (err error)

func (*Index) KeyValues

func (i *Index) KeyValues() <-chan KeyValue

func (*Index) KeysNotSeen

func (i *Index) KeysNotSeen() <-chan []byte

func (*Index) ResumeKey

func (i *Index) ResumeKey() (resumeKey []byte, err error)

func (*Index) Value

func (i *Index) Value(key []byte) []byte

type KeyValue

type KeyValue = diff.KeyValue

Jump to

Keyboard shortcuts

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