engine

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Engine

type Engine interface {
	// Engine returns the engine name and is used for debugging and logging.
	Engine() string

	// Close the engine so that it no longer can be accessed.
	Close() error
}

Engines are the disk storage mechanism that Honu wraps. Users may chose different engines for a variety of reasons, including variable performance benefits, different features, or even implement heterogeneous Honu networks composed of different engines.

type Iterator

type Iterator interface {
	Iter(prefix []byte) (i iterator.Iterator, err error)
}

Iterator engines allow queries that scan a range of consecutive keys.

type Store

type Store interface {
	Get(key []byte) (value []byte, err error)
	Put(key, value []byte) error
	Delete(key []byte) error
}

Store is a simple key/value interface that allows for Get, Put, and Delete. Nearly all engines should support the Store interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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