kvdb

package
v0.0.0-...-59e56fa Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst KeyValueStore, prefix []byte) (err error)

Copy data from src to dst.

func Move

func Move(src, dst KeyValueStore, prefix []byte) (err error)

Move data from src to dst.

Types

type DbProducer

type DbProducer interface {
	// Names of existing databases.
	Names() []string
	// OpenDb or create db with name.
	OpenDb(name string) KeyValueStore
}

DbProducer represents real db producer.

type Droper

type Droper interface {
	Drop()
}

Droper is able to delete the DB.

type FlushableKeyValueStore

type FlushableKeyValueStore interface {
	KeyValueStore

	NotFlushedPairs() int
	NotFlushedSizeEst() int
	Flush() error
	DropNotFlushed()
}

FlushableKeyValueStore contains all the method for flushable databases, i.e. databases which write changes on disk only on flush.

type IDStore

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

IDStore stores id

func NewIDStore

func NewIDStore(table KeyValueStore) *IDStore

NewIDStore constructor

func (*IDStore) GetID

func (p *IDStore) GetID() string

GetID is a getter

func (*IDStore) SetID

func (p *IDStore) SetID(id string)

SetID is a setter

type KeyValueStore

type KeyValueStore interface {
	ethdb.KeyValueStore
	Droper
}

KeyValueStore contains all the methods required to allow handling different key-value data stores backing the high level database.

Directories

Path Synopsis
Package leveldb implements the key-value database layer based on LevelDB.
Package leveldb implements the key-value database layer based on LevelDB.
Package memorydb implements the key-value database layer based on memory maps.
Package memorydb implements the key-value database layer based on memory maps.

Jump to

Keyboard shortcuts

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