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 ¶
Types ¶
type Storage ¶
type Storage interface { CreateTemporary() (Storage, error) Get(key []byte) ([]byte, error) Put(key []byte, value []byte) error Delete(key []byte) error HasPrefix(prefix []byte) bool ProcessByPrefix(prefix []byte, proc StorageProcessor) error KeysByPrefix(prefix []byte) [][]byte FetchByPrefix(prefix []byte) [][]byte Open() error Close() error StartBatch() FinishBatch() error CompactDB() error Drop() error }
Storage is an interface to KV storage
type StorageProcessor ¶ added in v1.0.0
StorageProcessor is a function to process one single storage entry
Click to show internal directories.
Click to hide internal directories.