kvstore

package
v0.9.21 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNotFound = leveldb.ErrNotFound

ErrorNotFound signal error for not found

Functions

This section is empty.

Types

type KVIterator

type KVIterator interface {
	Key() string
	Value() []byte
	Next() bool
	Prev() bool
	Seek(string) bool
	Last() bool
	Release()
}

KVIterator interface for key value iterators

type KVStore

type KVStore interface {
	Init() error
	Put(key string, val []byte) error
	Get(key string) ([]byte, error)
	Delete(key string) error
	NewIterator() KVIterator
	NewIteratorWithRange(keyRange interface{}) KVIterator
	Close() error
}

KVStore interface for key value stores

func NewLDBKeyValueStore

func NewLDBKeyValueStore(ldbPath string) KVStore

NewLDBKeyValueStore construct a new LevelDB instance of a KV store

Jump to

Keyboard shortcuts

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