Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyEmpty key is empty error ErrKeyEmpty = errors.New("key is empty") // ErrKeyNotFound key not found error ErrKeyNotFound = errors.New("key not found") )
Functions ¶
This section is empty.
Types ¶
type KVMapStore ¶
type KVMapStore struct {
// contains filtered or unexported fields
}
KVMapStore implements a non thread safe KVStore based on go maps
func (KVMapStore) Delete ¶
func (kvms KVMapStore) Delete(key Key) error
Delete deletes the key from the map, or returns an error if the key is not found
type KVStore ¶
type KVStore interface { // Set sets or replaces a key/value pair in the store Set(key Key, value Value) error // Get gets the value given the key Get(key Key) (Value, error) // Delete deletes a key, returns an error if the key don't exist Delete(key Key) error }
KVStore is a simple interface for KeyValue stores
Click to show internal directories.
Click to hide internal directories.