leveldb

package
v0.0.0-...-4b55cb2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenFileLimit = 64

Functions

This section is empty.

Types

type LevelDB

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

func NewLDBDatabase

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

NewLDBDatabase returns a LevelDB wrapped object.

func (*LevelDB) Close

func (db *LevelDB) Close() error

func (*LevelDB) Delete

func (db *LevelDB) Delete(key string) error

Delete deletes the key from the queue and database

func (*LevelDB) Get

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

Get returns the given key if it's present.

func (*LevelDB) IsExisted

func (db *LevelDB) IsExisted(key string) (bool, error)

func (*LevelDB) NewIterator

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

func (*LevelDB) NewIteratorWithPrefix

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

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

func (*LevelDB) Path

func (db *LevelDB) Path() string

Path returns the path to the database directory.

func (*LevelDB) Schema

func (db *LevelDB) Schema() string

func (*LevelDB) Set

func (db *LevelDB) Set(key string, value []byte, expiration time.Duration) 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