Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrReadOnlyTx = errors.New("cannot execute a write operation in a read only transaction") )
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
// Begin a transaction to issue multiple commands (this is an internal transaction
// for Honu-specific version management, not an external interface).
Begin(readonly bool) (tx Transaction, err 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, options *opts.Options) (i iterator.Iterator, err error)
}
Iterator engines allow queries that scan a range of consecutive keys.
type Store ¶
type Store interface {
Get(key []byte, options *opts.Options) (value []byte, err error)
Put(key, value []byte, options *opts.Options) error
Delete(key []byte, options *opts.Options) error
}
Store is a simple key/value interface that allows for Get, Put, and Delete. Nearly all engines should support the Store interface.
type Transaction ¶ added in v0.2.2
Click to show internal directories.
Click to hide internal directories.