Versions in this module Expand all Collapse all v1 v1.1.0 Mar 2, 2022 v1.0.11 Jan 20, 2020 Changes in this version + const Created + const Deleted + const Modified + const Unchanged + var Debug = false + var ErrMustRecordValues = errors.New("referenceIndex must record values") + var ErrMustSupportKeysNotSeen = errors.New("referenceIndex must support KeysNotSeen") + func Diff(referenceValues, currentValues <-chan KeyValue, changes chan Change, ...) error + func DiffIndexIndex(referenceIndex Index, currentIndex Index, changes chan Change, ...) error + func DiffIndexStream(referenceIndex Index, currentValues <-chan KeyValue, changes chan Change, ...) error + func DiffStreamIndex(referenceValues <-chan KeyValue, currentIndex Index, changes chan Change, ...) error + func DiffStreamReference(referenceValues, currentValues <-chan KeyValue, changes chan Change, ...) error + type Change struct + Key []byte + Type ChangeType + Value []byte + func (c Change) String() string + type ChangeType int + type CompareResult int + const MissingKey + const ModifiedKey + const UnchangedKey + type Index interface + func NewIndex(recordValues bool) Index + type Indexer interface + Index func(kvs <-chan KeyValue, resumeKey <-chan []byte) error + ResumeKey func() ([]byte, error) + type KeyValue struct + Key []byte + Value []byte + type MemoryIndex struct + func (i *MemoryIndex) Cleanup() (err error) + func (i *MemoryIndex) Compare(kv KeyValue) (CompareResult, error) + func (i *MemoryIndex) DoesRecordValues() bool + func (i *MemoryIndex) Index(kvs <-chan KeyValue, resumeKey <-chan []byte) (err error) + func (i *MemoryIndex) KeyValues() <-chan KeyValue + func (i *MemoryIndex) KeysNotSeen() <-chan []byte + func (i *MemoryIndex) ResumeKey() ([]byte, error) + func (i *MemoryIndex) Value(key []byte) []byte + type SyncIndex interface + Cleanup func() error + Compare func(kv KeyValue) (CompareResult, error) + DoesRecordValues func() bool + KeyValues func() <-chan KeyValue + KeysNotSeen func() <-chan []byte + Value func(key []byte) []byte