Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDiffStopped is the error returned when a diff opertion is stopped by a callback function ErrDiffStopped = errors.New("diff stopped") )
Functions ¶
func OrderedKeyValueStreams ¶
func OrderedKeyValueStreams( leftStream, rightStream <-chan *apiPB.KeyValue, onResult OnOrderedKeyValueDiffResult, ) error
OrderedKeyValueStreams diffs two ordered key-value streams. The streams must be closed eventually for the diff to terminate
Types ¶
type KeyValueDiffResult ¶
type KeyValueDiffResult int
KeyValueDiffResult represents a key-value diff result
const ( // KeyValueEqual means the two key-values are identical KeyValueEqual KeyValueDiffResult = iota // KeyValueValueDifferent means the two key-values are different in values KeyValueValueDifferent // KeyValueLeftKeyMissing means the left key-value is missing KeyValueLeftKeyMissing // KeyValueRightKeyMissing means the right key-value is missing KeyValueRightKeyMissing )
type OnOrderedKeyValueDiffResult ¶
type OnOrderedKeyValueDiffResult func(leftKV, rightKV *apiPB.KeyValue, result KeyValueDiffResult) error
OnOrderedKeyValueDiffResult represents the callback function when a diff result of a key-value is available
Click to show internal directories.
Click to hide internal directories.