database

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package database provides KV database for meta-information

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("key not found")
)

Errors for Storage

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Get(key []byte) ([]byte, error)
	Put(key []byte, value []byte) error
	Delete(key []byte) error
	KeysByPrefix(prefix []byte) [][]byte
	FetchByPrefix(prefix []byte) [][]byte
	Close() error
	StartBatch()
	FinishBatch() error
}

Storage is an interface to KV storage

func OpenDB

func OpenDB(path string) (Storage, error)

OpenDB opens (creates) LevelDB database

Jump to

Keyboard shortcuts

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