Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshot ¶
func NewSnapshot(snapshot *txnsnapshot.KVSnapshot) kv.Snapshot
NewSnapshot creates a kv.Snapshot with txnsnapshot.KVSnapshot.
func NewTiKVTxn ¶
func NewTiKVTxn(txn *tikv.KVTxn) kv.Transaction
NewTiKVTxn returns a new Transaction.
Types ¶
type BatchBufferGetter ¶
BatchBufferGetter is the interface for BatchGet.
type BatchGetter ¶
type BatchGetter interface { // BatchGet gets a batch of values. BatchGet(ctx context.Context, keys []kv.Key) (map[string][]byte, error) }
BatchGetter is the interface for BatchGet.
type BufferBatchGetter ¶
type BufferBatchGetter struct {
// contains filtered or unexported fields
}
BufferBatchGetter is the type for BatchGet with MemBuffer.
func NewBufferBatchGetter ¶
func NewBufferBatchGetter(buffer BatchBufferGetter, middleCache Getter, snapshot BatchGetter) *BufferBatchGetter
NewBufferBatchGetter creates a new BufferBatchGetter.
type Getter ¶
type Getter interface { // Get gets the value for key k from kv store. // If corresponding kv pair does not exist, it returns nil and ErrNotExist. Get(ctx context.Context, k kv.Key) ([]byte, error) }
Getter is the interface for the Get method.
type TiDBKVFilter ¶
type TiDBKVFilter struct{}
TiDBKVFilter is the filter specific to TiDB to filter out KV pairs that needn't be committed.
func (TiDBKVFilter) IsUnnecessaryKeyValue ¶
func (f TiDBKVFilter) IsUnnecessaryKeyValue(key, value []byte, flags tikvstore.KeyFlags) (bool, error)
IsUnnecessaryKeyValue defines which kinds of KV pairs from TiDB needn't be committed.
type UnionIter ¶
type UnionIter struct {
// contains filtered or unexported fields
}
UnionIter implements kv.Iterator
func NewUnionIter ¶
NewUnionIter returns a union iterator for BufferStore.
func (*UnionIter) Close ¶
func (iter *UnionIter) Close()
Close implements the Iterator Close interface.