Line data Source code
1 : // Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use 2 : // of this source code is governed by a BSD-style license that can be found in 3 : // the LICENSE file. 4 : 5 : package pebble 6 : 7 : import "github.com/cockroachdb/pebble/internal/base" 8 : 9 : // SeqNum exports the base.SeqNum type. 10 : type SeqNum = base.SeqNum 11 : 12 : // InternalKeyKind exports the base.InternalKeyKind type. 13 : type InternalKeyKind = base.InternalKeyKind 14 : 15 : // These constants are part of the file format, and should not be changed. 16 : const ( 17 : InternalKeyKindDelete = base.InternalKeyKindDelete 18 : InternalKeyKindSet = base.InternalKeyKindSet 19 : InternalKeyKindMerge = base.InternalKeyKindMerge 20 : InternalKeyKindLogData = base.InternalKeyKindLogData 21 : InternalKeyKindSingleDelete = base.InternalKeyKindSingleDelete 22 : InternalKeyKindRangeDelete = base.InternalKeyKindRangeDelete 23 : InternalKeyKindMax = base.InternalKeyKindMax 24 : InternalKeyKindSetWithDelete = base.InternalKeyKindSetWithDelete 25 : InternalKeyKindRangeKeySet = base.InternalKeyKindRangeKeySet 26 : InternalKeyKindRangeKeyUnset = base.InternalKeyKindRangeKeyUnset 27 : InternalKeyKindRangeKeyDelete = base.InternalKeyKindRangeKeyDelete 28 : InternalKeyKindRangeKeyMin = base.InternalKeyKindRangeKeyMin 29 : InternalKeyKindRangeKeyMax = base.InternalKeyKindRangeKeyMax 30 : InternalKeyKindIngestSST = base.InternalKeyKindIngestSST 31 : InternalKeyKindDeleteSized = base.InternalKeyKindDeleteSized 32 : InternalKeyKindInvalid = base.InternalKeyKindInvalid 33 : ) 34 : 35 : // InternalKeyTrailer exports the base.InternalKeyTrailer type. 36 : type InternalKeyTrailer = base.InternalKeyTrailer 37 : 38 : // InternalKey exports the base.InternalKey type. 39 : type InternalKey = base.InternalKey 40 : 41 : // MakeInternalKey constructs an internal key from a specified user key, 42 : // sequence number and kind. 43 0 : func MakeInternalKey(userKey []byte, seqNum SeqNum, kind InternalKeyKind) InternalKey { 44 0 : return base.MakeInternalKey(userKey, seqNum, kind) 45 0 : } 46 : 47 : type internalIterator = base.InternalIterator 48 : 49 : type topLevelIterator = base.TopLevelIterator 50 : 51 : // ErrCorruption is a marker to indicate that data in a file (WAL, MANIFEST, 52 : // sstable) isn't in the expected format. 53 : var ErrCorruption = base.ErrCorruption 54 : 55 : // AttributeAndLen exports the base.AttributeAndLen type. 56 : type AttributeAndLen = base.AttributeAndLen 57 : 58 : // ShortAttribute exports the base.ShortAttribute type. 59 : type ShortAttribute = base.ShortAttribute 60 : 61 : // LazyFetcher exports the base.LazyFetcher type. This export is needed since 62 : // LazyValue.Clone requires a pointer to a LazyFetcher struct to avoid 63 : // allocations. No code outside Pebble needs to peer into a LazyFetcher. 64 : type LazyFetcher = base.LazyFetcher