Documentation ¶
Overview ¶
Package sled implements a non-blocking, thread safe key value store. When used in multiple threads Sled is faster than go's built in map type which must be combined with synchronization primitives.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyList is returned when an invalid operation is performed on an // empty list. ErrEmptyList = errors.New("Empty list") )
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element interface { Key() string Value() interface{} Close() }
Element is interface for accessing keys and values when iterating. For effectuate memory utilization elements are implemented as a pool of re-usable structures and therefore must be closed after use.
type ErrCanceled ¶
type ErrCanceled struct{}
func (ErrCanceled) Error ¶
func (ErrCanceled) Error() string
type ErrGetType ¶
type ErrGetType struct {
// contains filtered or unexported fields
}
func (ErrGetType) Error ¶
func (e ErrGetType) Error() string
type IoMode ¶
type IoMode uint
IoMode represents the mode of a sled as either ReadWrite, or ReadOnly.
type Sled ¶
type Sled interface { Set(key string, v interface{}) error Get(key string, v interface{}) error SetIfNil(string, interface{}) bool Delete(string) (interface{}, bool) Close() error Iterate(<-chan struct{}) <-chan Element Snapshot(IoMode) Sled Size() uint }
Sled is an interface for sled key value store types.
Click to show internal directories.
Click to hide internal directories.