package
2.0.2
Repository: https://github.com/cockroachdb/pebble.git
Documentation: pkg.go.dev

# Packages

Package keyspanimpl contains Pebble-specific implementations of keyspan fragment iterators.

# Functions

Assert wraps an iterator which asserts that operations return sane results.
AssertBounds wraps an iterator and asserts that all spans are within the given bounds [lower.UserKey, upper), and that all keys in a span that starts exactly at lower.UserKey are >= lower.
AssertUserKeyBounds wraps an iterator and asserts that all spans are within the given bounds [lower, upper).
Filter returns a new filteringIter that will filter the Spans from the provided child iterator using the provided FilterFunc.
Get returns the newest span that contains the target key.
InjectLogging wraps all iterators in a stack with logging iterators, producing log messages showing each operation and its result.
MaybeAssert potentially wraps an iterator with Assert and/or NewInvalidatingIter if we are in testing mode.
NewInvalidatingIter wraps a FragmentIterator; spans surfaced by the inner iterator are copied to buffers that are zeroed by subsequent iterator positioning calls.
NewIter returns a new iterator over a set of fragmented spans.
ParseAndAttachProbes parses DSL probes and attaches them to an iterator.
ParseSpan parses the string representation of a Span.
RunFragmentIteratorCmd runs a command on an iterator; intended for testing.
RunIterCmd evaluates a datadriven command controlling an internal keyspan.FragmentIterator, writing the results of the iterator operations to the provided writer.
SeekLE seeks to the span that contains or is before the target key.
SortKeysByTrailer sorts a Keys slice by trailer.
SortKeysByTrailerAndSuffix sorts a Keys slice by trailer, and among keys with equal trailers, by suffix.
SortSpansByEndKey sorts the spans by the end key.
SortSpansByStartKey sorts the spans by start key.
Truncate creates a new iterator where every span in the supplied iterator is truncated to be contained within the given user key bounds.
VisibleTransform filters keys that are invisible at the provided snapshot sequence number.

# Constants

10 KB.
BySuffixAsc indicates a Span's keys are sorted by Suffix ascending.
ByTrailerDesc indicates a Span's keys are sorted by InternalKeyTrailer descending.
OpKind values.
OpKind values.
OpKind values.
OpKind values.
OpKind values.
OpKind values.
OpKind values.

# Variables

DefragmentInternal configures a DefragmentingIter to defragment spans only if they have identical keys.
ErrInjected is an error artificially injected for testing.
NoopTransform is a Transformer that performs no mutations.
StaticDefragmentReducer is a no-op DefragmentReducer that simply returns the current key slice, effectively retaining the first set of keys encountered for a defragmented span.

# Structs

BoundedIter implements FragmentIterator and enforces bounds.
DefragmentingBuffers holds buffers used for copying iterator state.
DefragmentingIter wraps a key span iterator, defragmenting physical fragmentation during iteration.
Fragmenter fragments a set of spans such that overlapping spans are split at their overlap points.
InterleavingIter combines an iterator over point keys with an iterator over key spans.
InterleavingIterOpts holds options configuring the behavior of a InterleavingIter.
Iter is an iterator over a set of fragmented spans.
Key represents a single key applied over a span of user keys.
Span represents a set of keys over a span of user key space.
SpanIterOptions is a subset of IterOptions that are necessary to instantiate per-sstable span iterators.
TransformerIter is a FragmentIterator that applies a Transformer on all returned keys.

# Interfaces

DefragmentMethod configures the defragmentation performed by the DefragmentingIter.
FragmentIterator defines an iterator interface over spans.
A SpanMask may be used to configure an interleaving iterator to skip point keys that fall within the bounds of some spans.
Transformer defines a transformation to be applied to a Span.

# Type aliases

The DefragmentMethodFunc type is an adapter to allow the use of ordinary functions as DefragmentMethods.
DefragmentReducer merges the current and next Key slices, returning a new Key slice.
FilterFunc is a callback that allows filtering keys from a Span.
KeysOrder describes the ordering of Keys within a Span.
OpKind indicates the type of iterator operation being performed.
The TransformerFunc type is an adapter to allow the use of ordinary functions as Transformers.
WrapFn is the prototype for a function that wraps a FragmentIterator.