Versions in this module Expand all Collapse all v2 v2.0.2 Jan 22, 2025 Changes in this version + const BufferReuseMaxCapacity + var ErrInjected = &errorProbe + func RunFragmentIteratorCmd(iter FragmentIterator, input string, extraInfo func() string) string + func RunIterCmd(tdInput string, iter FragmentIterator, w io.Writer) + func SortKeysByTrailer(keys []Key) + func SortKeysByTrailerAndSuffix(suffixCmp base.CompareRangeSuffixes, keys []Key) + func SortSpansByEndKey(cmp base.Compare, spans []Span) + func SortSpansByStartKey(cmp base.Compare, spans []Span) + type BoundedIter struct + func (i *BoundedIter) Close() + func (i *BoundedIter) DebugTree(tp treeprinter.Node) + func (i *BoundedIter) First() (*Span, error) + func (i *BoundedIter) Init(cmp base.Compare, split base.Split, iter FragmentIterator, lower, upper []byte, ...) + func (i *BoundedIter) Last() (*Span, error) + func (i *BoundedIter) Next() (*Span, error) + func (i *BoundedIter) Prev() (*Span, error) + func (i *BoundedIter) SeekGE(key []byte) (*Span, error) + func (i *BoundedIter) SeekLT(key []byte) (*Span, error) + func (i *BoundedIter) SetBounds(lower, upper []byte) + func (i *BoundedIter) SetContext(ctx context.Context) + func (i *BoundedIter) WrapChildren(wrap WrapFn) + type DefragmentMethod interface + ShouldDefragment func(suffixCmp base.CompareRangeSuffixes, left, right *Span) bool + var DefragmentInternal DefragmentMethod = DefragmentMethodFunc(func(suffixCmp base.CompareRangeSuffixes, a, b *Span) bool { ... }) + type DefragmentMethodFunc func(suffixCmp base.CompareRangeSuffixes, left, right *Span) bool + func (f DefragmentMethodFunc) ShouldDefragment(suffixCmp base.CompareRangeSuffixes, left, right *Span) bool + type DefragmentReducer func(cur, next []Key) []Key + var StaticDefragmentReducer DefragmentReducer = func(cur, _ []Key) []Key { ... } + type DefragmentingBuffers struct + func (bufs *DefragmentingBuffers) PrepareForReuse() + type DefragmentingIter struct + func (i *DefragmentingIter) Close() + func (i *DefragmentingIter) DebugTree(tp treeprinter.Node) + func (i *DefragmentingIter) First() (*Span, error) + func (i *DefragmentingIter) Init(comparer *base.Comparer, iter FragmentIterator, equal DefragmentMethod, ...) + func (i *DefragmentingIter) Last() (*Span, error) + func (i *DefragmentingIter) Next() (*Span, error) + func (i *DefragmentingIter) Prev() (*Span, error) + func (i *DefragmentingIter) SeekGE(key []byte) (*Span, error) + func (i *DefragmentingIter) SeekLT(key []byte) (*Span, error) + func (i *DefragmentingIter) SetContext(ctx context.Context) + func (i *DefragmentingIter) WrapChildren(wrap WrapFn) + type FilterFunc func(span *Span, buf []Key) []Key + type FragmentIterator interface + Close func() + First func() (*Span, error) + Last func() (*Span, error) + Next func() (*Span, error) + Prev func() (*Span, error) + SeekGE func(key []byte) (*Span, error) + SeekLT func(key []byte) (*Span, error) + SetContext func(ctx context.Context) + WrapChildren func(wrap WrapFn) + func Assert(iter FragmentIterator, cmp base.Compare) FragmentIterator + func AssertBounds(iter FragmentIterator, lower base.InternalKey, upper []byte, cmp base.Compare) FragmentIterator + func AssertUserKeyBounds(iter FragmentIterator, lower, upper []byte, cmp base.Compare) FragmentIterator + func Filter(iter FragmentIterator, filter FilterFunc, cmp base.Compare) FragmentIterator + func InjectLogging(iter FragmentIterator, logger base.Logger) FragmentIterator + func MaybeAssert(iter FragmentIterator, cmp base.Compare) FragmentIterator + func NewInvalidatingIter(iter FragmentIterator) FragmentIterator + func ParseAndAttachProbes(iter FragmentIterator, log io.Writer, probeDSLs ...string) FragmentIterator + func Truncate(cmp base.Compare, iter FragmentIterator, bounds base.UserKeyBounds) FragmentIterator + type Fragmenter struct + Cmp base.Compare + Emit func(Span) + Format base.FormatKey + func (f *Fragmenter) Add(s Span) + func (f *Fragmenter) Empty() bool + func (f *Fragmenter) Finish() + func (f *Fragmenter) Start() []byte + func (f *Fragmenter) Truncate(key []byte) + type InterleavingIter struct + func (i *InterleavingIter) Close() error + func (i *InterleavingIter) DebugTree(tp treeprinter.Node) + func (i *InterleavingIter) Error() error + func (i *InterleavingIter) First() *base.InternalKV + func (i *InterleavingIter) Init(comparer *base.Comparer, pointIter base.InternalIterator, ...) + func (i *InterleavingIter) InitSeekGE(prefix, key []byte, pointKV *base.InternalKV) *base.InternalKV + func (i *InterleavingIter) InitSeekLT(key []byte, pointKV *base.InternalKV) *base.InternalKV + func (i *InterleavingIter) Invalidate() + func (i *InterleavingIter) Last() *base.InternalKV + func (i *InterleavingIter) Next() *base.InternalKV + func (i *InterleavingIter) NextPrefix(succKey []byte) *base.InternalKV + func (i *InterleavingIter) Prev() *base.InternalKV + func (i *InterleavingIter) SeekGE(key []byte, flags base.SeekGEFlags) *base.InternalKV + func (i *InterleavingIter) SeekLT(key []byte, flags base.SeekLTFlags) *base.InternalKV + func (i *InterleavingIter) SeekPrefixGE(prefix, key []byte, flags base.SeekGEFlags) *base.InternalKV + func (i *InterleavingIter) SetBounds(lower, upper []byte) + func (i *InterleavingIter) SetContext(ctx context.Context) + func (i *InterleavingIter) Span() *Span + func (i *InterleavingIter) String() string + type InterleavingIterOpts struct + InterleaveEndKeys bool + LowerBound []byte + Mask SpanMask + UpperBound []byte + type Iter struct + func NewIter(cmp base.Compare, spans []Span) *Iter + func (i *Iter) Close() + func (i *Iter) Count() int + func (i *Iter) DebugTree(tp treeprinter.Node) + func (i *Iter) First() (*Span, error) + func (i *Iter) Init(cmp base.Compare, spans []Span) + func (i *Iter) Last() (*Span, error) + func (i *Iter) Next() (*Span, error) + func (i *Iter) Prev() (*Span, error) + func (i *Iter) SeekGE(key []byte) (*Span, error) + func (i *Iter) SeekLT(key []byte) (*Span, error) + func (i *Iter) SetContext(ctx context.Context) + func (i *Iter) String() string + func (i *Iter) WrapChildren(wrap WrapFn) + type Key struct + Suffix []byte + Trailer base.InternalKeyTrailer + Value []byte + func (k *Key) CopyFrom(other Key) + func (k Key) Clone() Key + func (k Key) Equal(suffixCmp base.CompareRangeSuffixes, b Key) bool + func (k Key) Kind() base.InternalKeyKind + func (k Key) SeqNum() base.SeqNum + func (k Key) String() string + func (k Key) VisibleAt(snapshot base.SeqNum) bool + type KeysOrder int8 + const BySuffixAsc + const ByTrailerDesc + type OpKind int8 + const OpClose + const OpFirst + const OpLast + const OpNext + const OpPrev + const OpSeekGE + const OpSeekLT + func (o OpKind) Evaluate(pctx *probeContext) bool + func (o OpKind) String() string + type Span struct + End []byte + Keys []Key + KeysOrder KeysOrder + Start []byte + func Get(cmp base.Compare, iter FragmentIterator, key []byte) (*Span, error) + func ParseSpan(input string) Span + func SeekLE(cmp base.Compare, iter FragmentIterator, key []byte) (*Span, error) + func (s *Span) Bounds() base.UserKeyBounds + func (s *Span) Clone() Span + func (s *Span) Contains(cmp base.Compare, key []byte) bool + func (s *Span) CopyFrom(other *Span) + func (s *Span) CoversAt(snapshot, seqNum base.SeqNum) bool + func (s *Span) Empty() bool + func (s *Span) LargestKey() base.InternalKey + func (s *Span) LargestSeqNum() base.SeqNum + func (s *Span) LargestVisibleSeqNum(snapshot base.SeqNum) (largest base.SeqNum, ok bool) + func (s *Span) Reset() + func (s *Span) SmallestKey() base.InternalKey + func (s *Span) SmallestSeqNum() base.SeqNum + func (s *Span) Valid() bool + func (s *Span) VisibleAt(snapshot base.SeqNum) bool + func (s Span) Covers(seqNum base.SeqNum) bool + func (s Span) Pretty(f base.FormatKey) fmt.Formatter + func (s Span) String() string + func (s Span) Visible(snapshot base.SeqNum) Span + type SpanIterOptions struct + RangeKeyFilters []base.BlockPropertyFilter + type SpanMask interface + SkipPoint func(userKey []byte) bool + SpanChanged func(*Span) + type Transformer interface + Transform func(suffixCmp base.CompareRangeSuffixes, in Span, out *Span) error + var NoopTransform Transformer = TransformerFunc(func(_ base.CompareRangeSuffixes, s Span, dst *Span) error { ... }) + func VisibleTransform(snapshot base.SeqNum) Transformer + type TransformerFunc func(base.CompareRangeSuffixes, Span, *Span) error + func (tf TransformerFunc) Transform(suffixCmp base.CompareRangeSuffixes, in Span, out *Span) error + type TransformerIter struct + SuffixCmp base.CompareRangeSuffixes + Transformer Transformer + func (t *TransformerIter) Close() + func (t *TransformerIter) First() (*Span, error) + func (t *TransformerIter) Last() (*Span, error) + func (t *TransformerIter) Next() (*Span, error) + func (t *TransformerIter) Prev() (*Span, error) + func (t *TransformerIter) SeekGE(key []byte) (*Span, error) + func (t *TransformerIter) SeekLT(key []byte) (*Span, error) + type WrapFn func(in FragmentIterator) FragmentIterator Other modules containing this package github.com/cockroachdb/pebble