Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
func Diff(ctx context.Context, s cadata.Store, leftIt, rightIt Iterator, span Span, fn DiffFn) error
Diff calls fn with all the keys and values that are different between the two Iterators
Types ¶
type Entry ¶
type Entry struct {
Key, Value []byte
}
Entry is a single entry in a stream/tree
type Iterator ¶
Iterator iterates over entries
e.g.
if err := it.Seek(ctx, key); err != nil {
return err
}
var ent Entry
for err := it.Next(ctx, &ent); err != EOS; err = it.Next(ctx, &ent) {
if err != nil {
return err
}
// use ent here. ent will be valid until the next call to it.Next
}
type Literal ¶
type Literal struct {
// contains filtered or unexported fields
}
Literal is a stream literal, satisfying the Iterator interface. It can be constructed with a slice using NewLiteral
func NewLiteral ¶
type Span ¶
A span of keys [Begin, End) If you want to include a specific end key, use the KeyAfter function. nil is interpretted as no bound, not as a 0 length key. This behaviour is only releveant for End.
func PrefixSpan ¶
PrefixSpan returns a Span that includes all keys with prefix p
func SingleItemSpan ¶
Click to show internal directories.
Click to hide internal directories.