kvdb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path     string
	ReadOnly bool
	ForceNew bool
}

Config provides configuration parameters for KeyValueDB.

type KeyValueDB

type KeyValueDB interface {
	Put(key []byte, value []byte) error
	Get(key []byte) ([]byte, bool, error)
	Keys() ([]string, error)
	DropAll() error
	Close() error
}

KeyValueDB is an interface implemented by key-value databases which spaGO can use.

func NewDefaultKeyValueDB

func NewDefaultKeyValueDB(config Config) KeyValueDB

NewDefaultKeyValueDB returns a new KeyValueDB.

Jump to

Keyboard shortcuts

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