Documentation
¶
Overview ¶
Package impl contains a DB's load/store mechanisms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrProtoExists occurs when you register a proto that is already registered. ErrProtoExists = errors.New("proto exists") // ErrUnknownProto occurs when you try to get a proto that is not registered. ErrUnknownProto = errors.New("unknown proto") )
View Source
var ErrClosed = errors.New("impl is closed")
ErrClosed should be returned from any method when an Impl is closed.
Functions ¶
Types ¶
type Impl ¶
type Impl interface {
Keys() ([]string, error)
Get(k string) ([]byte, error)
Set(k string, v []byte) error
Del(k string) error
Close() error
}
Impl is a generic key-value store backend.
type NoKeyError ¶ added in v0.4.1
NoKeyError is an error getting a certain key.
func NoKey ¶ added in v0.4.1
func NoKey(k string, errs ...error) NoKeyError
NoKey is a convenience function for creating NoKeyErrs.
func (NoKeyError) Error ¶ added in v0.4.1
func (n NoKeyError) Error() string
Error implements error.
func (NoKeyError) Unwrap ¶ added in v0.4.1
func (n NoKeyError) Unwrap() error
Unwrap for errors.Unwrap.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fs contains a filesystem-based Impl.
|
Package fs contains a filesystem-based Impl. |
|
Package mem contains a very simple in-memory Impl.
|
Package mem contains a very simple in-memory Impl. |
|
Package table contains an Impl that wraps a given key of another Impl.
|
Package table contains an Impl that wraps a given key of another Impl. |
Click to show internal directories.
Click to hide internal directories.