leveldb

package
v0.0.0-...-b9128f4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenFileLimit = 64

Functions

This section is empty.

Types

type LDBDatabase

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

func NewLDBDatabase

func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error)

NewLDBDatabase returns a LevelDB wrapped object.

func (*LDBDatabase) Close

func (db *LDBDatabase) Close()

func (*LDBDatabase) Delete

func (db *LDBDatabase) Delete(key []byte) error

Delete deletes the key from the queue and database

func (*LDBDatabase) Get

func (db *LDBDatabase) Get(key []byte) ([]byte, error)

Get returns the given key if it's present.

func (*LDBDatabase) Has

func (db *LDBDatabase) Has(key []byte) (bool, error)

func (*LDBDatabase) LDB

func (db *LDBDatabase) LDB() *leveldb.DB

func (*LDBDatabase) Meter

func (db *LDBDatabase) Meter(prefix string)

Meter configures the database metrics collectors and

func (*LDBDatabase) NewBatch

func (db *LDBDatabase) NewBatch() fdb.Batch

func (*LDBDatabase) NewIterator

func (db *LDBDatabase) NewIterator() iterator.Iterator

func (*LDBDatabase) NewIteratorWithPrefix

func (db *LDBDatabase) NewIteratorWithPrefix(prefix []byte) iterator.Iterator

NewIteratorWithPrefix returns a iterator to iterate over subset of database content with a particular prefix.

func (*LDBDatabase) Path

func (db *LDBDatabase) Path() string

Path returns the path to the database directory.

func (*LDBDatabase) Put

func (db *LDBDatabase) Put(key []byte, value []byte) error

Put puts the given key / value to the queue

Jump to

Keyboard shortcuts

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