database

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB added in v0.2.0

type DB interface {
	// NewStore creates a new KVStore backed by the database.
	NewStore() kvstore.KVStore
	// Close closes a DB.
	Close() error

	// RequiresGC returns whether the database requires a call of GC() to clean deleted items.
	RequiresGC() bool
	// GC runs the garbage collection to clean deleted database items.
	GC() error
}

DB represents a database abstraction.

func NewDB added in v0.2.0

func NewDB(dirname string) (DB, error)

NewDB returns a new persisting DB object.

func NewMemDB added in v0.2.0

func NewMemDB() (DB, error)

NewMemDB returns a new in-memory (not persisted) DB object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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