leveldb

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigLevelDB

type ConfigLevelDB struct {
	DB Item `yaml:"leveldb"`
}

type Item

type Item struct {
	Path     string `yaml:"path"`
	InMemory bool   `yaml:"inmemory"`
}

type LevelDB

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

func New

func New(cfg *ConfigLevelDB) *LevelDB

func (*LevelDB) Down

func (l *LevelDB) Down() error

func (*LevelDB) Get

func (l *LevelDB) Get() *ldb.DB

func (*LevelDB) IteratorByPrefix

func (l *LevelDB) IteratorByPrefix(prefix []byte, fn func(key, val []byte) error) error

func (*LevelDB) Tx

func (l *LevelDB) Tx(fn func(*ldb.Transaction) error) error

func (*LevelDB) Up

func (l *LevelDB) Up() error

Jump to

Keyboard shortcuts

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