store

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockAddr = "mocktikv://"

MockAddr default mock tikv addr

Functions

func BatchGetValues

func BatchGetValues(txn Transaction, keys [][]byte) (map[string][]byte, error)

BatchGetValues issue batch requests to get values

func IsConflictError

func IsConflictError(err error) bool

func IsErrNotFound

func IsErrNotFound(err error) bool

IsErrNotFound checks if err is a kind of NotFound error.

func IsRetryableError

func IsRetryableError(err error) bool

IsRetryableError checks if err is a kind of RetryableError error.

func LockKeys

func LockKeys(txn Transaction, keys [][]byte) error

LockKeys tries to lock the entries with the keys in KV store.

func RunInNewTxn

func RunInNewTxn(store Storage, retryable bool, f func(txn kv.Transaction) error) error

Types

type Iterator

type Iterator kv.Iterator

Iterator is the interface for a iterator on KV store.

type Storage

type Storage kv.Storage

Storage defines the interface for storage.

func MockOpen

func MockOpen(addrs string) (r Storage, e error)

MockOpen create fake tikv db

func Open

func Open(addrs string) (r Storage, e error)

Open create tikv db ,create fake db if addr contains mockaddr

type Transaction

type Transaction kv.Transaction

Transaction defines the interface for operations inside a Transaction.

Jump to

Keyboard shortcuts

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