leveldb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 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) 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) Start added in v1.2.0

func (l *LevelDB) Start() error

func (*LevelDB) Stop added in v1.2.0

func (l *LevelDB) Stop() error

func (*LevelDB) Tx

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

Jump to

Keyboard shortcuts

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