leveldb

package
v0.0.0-...-3408d66 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Codec is the codec used to marshal/unmarshal interfaces into the byte slices required by the Diskv client
	Codec codec.Codec
)

Functions

This section is empty.

Types

type DB

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

DB is a light wrapper around the leveldb struct

func New

func New(file string, opts *opt.Options) (*DB, error)

New returns a new key/value store powered by leveldb

func (*DB) Close

func (db *DB) Close() error

Close is used to close the database.

func (*DB) DB

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

DB returns the underlying LevelDB database

func (*DB) Del

func (db *DB) Del(key string) error

Del implements the "kv.Store".Del interface

func (*DB) Get

func (db *DB) Get(key string, dstVal interface{}) error

Get implements the "kv.Store".Get interface

func (*DB) Set

func (db *DB) Set(key string, val interface{}) error

Set implements the "kv.Store".Set interface

Jump to

Keyboard shortcuts

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