common

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyKey = errors.New("empty key is not supported")
View Source
var ErrNotFound = leveldb.ErrNotFound

Functions

func String

func String(b []byte) string

String converts byte slice to string.

func StringBytes

func StringBytes(s string) []byte

StringBytes converts string to byte slice.

func ToEthKeyValueStore

func ToEthKeyValueStore(store TiKVStore) ethdb.KeyValueStore

Types

type TiKVStore

type TiKVStore interface {
	ethdb.KeyValueReader
	ethdb.KeyValueWriter
	ethdb.Batcher
	ethdb.Stater
	ethdb.Compacter
	io.Closer

	NewIterator(start, end []byte) ethdb.Iterator
}

type TiKVStoreWrapper

type TiKVStoreWrapper struct {
	TiKVStore
}

TiKVStoreWrapper simple wrapper to covert to ethdb.KeyValueStore

func (*TiKVStoreWrapper) NewIterator

func (t *TiKVStoreWrapper) NewIterator() ethdb.Iterator

func (*TiKVStoreWrapper) NewIteratorWithPrefix

func (t *TiKVStoreWrapper) NewIteratorWithPrefix(prefix []byte) ethdb.Iterator

func (*TiKVStoreWrapper) NewIteratorWithStart

func (t *TiKVStoreWrapper) NewIteratorWithStart(start []byte) ethdb.Iterator

Jump to

Keyboard shortcuts

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