leveldb

package
v0.0.0-...-1de2f69 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is a wrapper around a LevelDB database

func New

func New(path string) *Database

New creates a LevelDB instance at path.

Creates the path if it does not exist.

func (Database) Close

func (d Database) Close()

Close shuts down the database.

func (Database) Compact

func (d Database) Compact()

Compact runs log and sstable compaction.

func (Database) Delete

func (d Database) Delete(k db.Key)

Delete deletes a key from the database.

func (Database) Get

func (d Database) Get(k db.Key) db.MaybeValue

Get retrieves a key from the database.

func (Database) Put

func (d Database) Put(k db.Key, v db.Value)

Put inserts a key into the database.

Jump to

Keyboard shortcuts

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