tikv

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackOff

func BackOff(attempts uint) int

Types

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator(start []byte, stop []byte, r kv.Retriever, reverse bool) (*Iterator, error)

reverse not support by tikv yet

func (*Iterator) Close

func (it *Iterator) Close()

func (*Iterator) Key

func (it *Iterator) Key() []byte

func (*Iterator) Next

func (it *Iterator) Next() error

func (*Iterator) Valid

func (it *Iterator) Valid() bool

func (*Iterator) Value

func (it *Iterator) Value() []byte

type Tikv

type Tikv struct {
	// contains filtered or unexported fields
}

func Open

func Open(conf *config.Config) (*Tikv, error)

func (*Tikv) BatchInTxn

func (tikv *Tikv) BatchInTxn(f func(txn interface{}) (interface{}, error)) (interface{}, error)

func (*Tikv) BatchWithTxn

func (tikv *Tikv) BatchWithTxn(f func(txn interface{}) (interface{}, error), txn1 interface{}) (interface{}, error)

func (*Tikv) Close

func (tikv *Tikv) Close() error

func (*Tikv) Delete

func (tikv *Tikv) Delete(keys [][]byte) (int, error)

func (*Tikv) DeleteRange

func (tikv *Tikv) DeleteRange(start []byte, end []byte, limit uint64) (uint64, error)

func (*Tikv) DeleteRangeWithTxn

func (tikv *Tikv) DeleteRangeWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) (uint64, error)

func (*Tikv) DeleteWithTxn

func (tikv *Tikv) DeleteWithTxn(keys [][]byte, txn interface{}) (int, error)

func (*Tikv) Get

func (tikv *Tikv) Get(key []byte) ([]byte, error)

func (*Tikv) GetCurrentVersion added in v1.1.0

func (tikv *Tikv) GetCurrentVersion() (uint64, error)

func (*Tikv) GetNewestSnapshot

func (tikv *Tikv) GetNewestSnapshot() (interface{}, error)

func (*Tikv) GetRangeKeys

func (tikv *Tikv) GetRangeKeys(start []byte, end []byte, offset, limit uint64, snapshot interface{}) ([][]byte, error)

func (*Tikv) GetRangeKeysCount

func (tikv *Tikv) GetRangeKeysCount(start []byte, withstart bool, end []byte, withend bool, limit uint64, snapshot interface{}) (uint64, error)

func (*Tikv) GetRangeKeysCountWithTxn

func (tikv *Tikv) GetRangeKeysCountWithTxn(start []byte, withstart bool, end []byte, withend bool, limit uint64, txn interface{}) (uint64, error)

func (*Tikv) GetRangeKeysVals

func (tikv *Tikv) GetRangeKeysVals(start []byte, end []byte, limit uint64, snapshot interface{}) ([][]byte, error)

func (*Tikv) GetRangeKeysValsWithTxn

func (tikv *Tikv) GetRangeKeysValsWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) ([][]byte, error)

func (*Tikv) GetRangeKeysWithFrontier

func (tikv *Tikv) GetRangeKeysWithFrontier(start []byte, withstart bool, end []byte, withend bool, offset, limit uint64, snapshot interface{}) ([][]byte, error)

func (*Tikv) GetRangeKeysWithFrontierWithTxn

func (tikv *Tikv) GetRangeKeysWithFrontierWithTxn(start []byte, withstart bool, end []byte, withend bool, offset, limit uint64, txn interface{}) ([][]byte, error)

func (*Tikv) GetRangeKeysWithTxn

func (tikv *Tikv) GetRangeKeysWithTxn(start []byte, end []byte, offset, limit uint64, txn interface{}) ([][]byte, error)

func (*Tikv) GetRangeVals

func (tikv *Tikv) GetRangeVals(start []byte, end []byte, limit uint64, snapshot interface{}) ([][]byte, error)

func (*Tikv) GetRangeValsWithTxn

func (tikv *Tikv) GetRangeValsWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) ([][]byte, error)

func (*Tikv) GetRank

func (tikv *Tikv) GetRank(start, end, obj []byte, snapshot interface{}) (int64, bool, error)

func (*Tikv) GetRankWithTxn

func (tikv *Tikv) GetRankWithTxn(start, end, obj []byte, txn interface{}) (int64, bool, error)

func (*Tikv) GetSnapshotFromTxn

func (tikv *Tikv) GetSnapshotFromTxn(txn1 interface{}) interface{}

func (*Tikv) GetTxnRetry

func (tikv *Tikv) GetTxnRetry() int

func (*Tikv) GetWithSnapshot

func (tikv *Tikv) GetWithSnapshot(key []byte, ss interface{}) ([]byte, error)

func (*Tikv) GetWithTxn

func (tikv *Tikv) GetWithTxn(key []byte, txn1 interface{}) ([]byte, error)

func (*Tikv) GetWithVersion

func (tikv *Tikv) GetWithVersion(key []byte, version uint64) ([]byte, error)

func (*Tikv) MGet

func (tikv *Tikv) MGet(keys [][]byte) (map[string][]byte, error)

func (*Tikv) MGetWithSnapshot

func (tikv *Tikv) MGetWithSnapshot(keys [][]byte, ss interface{}) (map[string][]byte, error)

func (*Tikv) MGetWithTxn

func (tikv *Tikv) MGetWithTxn(keys [][]byte, txn interface{}) (map[string][]byte, error)

func (*Tikv) MGetWithVersion

func (tikv *Tikv) MGetWithVersion(keys [][]byte, version uint64) (map[string][]byte, error)

func (*Tikv) MSet

func (tikv *Tikv) MSet(kvm map[string][]byte) (int, error)

map key cannot be []byte, use string

func (*Tikv) MSetWithTxn

func (tikv *Tikv) MSetWithTxn(kvm map[string][]byte, txn interface{}) (int, error)

func (*Tikv) NewTxn

func (tikv *Tikv) NewTxn() (interface{}, error)

func (*Tikv) RunGC added in v1.1.0

func (tikv *Tikv) RunGC(safePoint uint64, concurrency int) error

func (*Tikv) Set

func (tikv *Tikv) Set(key []byte, value []byte) error

set must be run in txn

func (*Tikv) SetTxnRetry

func (tikv *Tikv) SetTxnRetry(count int)

func (*Tikv) SetWithTxn

func (tikv *Tikv) SetWithTxn(key []byte, value []byte, txn interface{}) error

func (*Tikv) UnsafeDeleteRange added in v1.0.0

func (tikv *Tikv) UnsafeDeleteRange(start, end []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL