driver

package
v0.0.0-...-6fda876 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenLevelDB

func OpenLevelDB(path string) (*ldb_wrapper, error)

Types

type Batch

type Batch interface {
	Put(key, value string)
	Delete(key string)
	Write() error
}

type DB

type DB interface {
	Get(key string) (string, error)
	Put(key, value string) error
	Has(key string) (bool, error)
	Delete(key string) error
	Close() error
	Batch() Batch
	PrefixIterator(prefix string) Iterator
	RangeIterator(start, limit string) Iterator
	OpenTransaction() (Transaction, error)
}

type Iterator

type Iterator interface {
	Seek(key string) bool
	Next() bool
	Key() string
	Value() string
	Release()
	Error() error
}

type Transaction

type Transaction interface {
	Put(key, value string)
	Delete(key string)
	Commit() error
	Discard()
}

Jump to

Keyboard shortcuts

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