db

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PeersCache is used for the db entries used for peers DB
	PeersCache storagePrefix = iota
	// DeduplicatorCache is used for the db entries used for messages
	// deduplication cache
	DeduplicatorCache
)

Variables

This section is empty.

Functions

func Create

func Create(path, dbName string) (*leveldb.DB, error)

Create returns status pointer to leveldb.DB.

func Key

func Key(prefix storagePrefix, data ...[]byte) []byte

Key creates a DB key for a specified service with specified data

func Open

func Open(path string, opts *opt.Options) (db *leveldb.DB, err error)

Open opens an existing leveldb database

Types

This section is empty.

Jump to

Keyboard shortcuts

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