Documentation ¶
Overview ¶
Package memkv implements an in-memory key/value store.
Index ¶
- Variables
- type KVPair
- type KVPairs
- type Store
- func (s Store) Del(key string)
- func (s Store) Exists(key string) bool
- func (s Store) Get(key string) (KVPair, error)
- func (s Store) GetAll(pattern string) (KVPairs, error)
- func (s Store) GetAllValues(pattern string) ([]string, error)
- func (s Store) GetValue(key string) (string, error)
- func (s Store) List(filePath string) []string
- func (s Store) ListDir(filePath string) []string
- func (s Store) Purge()
- func (s Store) Set(key string, value string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMatch = errors.New("no keys match")
View Source
var ErrNotExist = errors.New("key does not exist")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { FuncMap map[string]interface{} sync.RWMutex // contains filtered or unexported fields }
A Store represents an in-memory key-value store safe for concurrent access.
func (Store) Get ¶
Get gets the KVPair associated with key. If there is no KVPair associated with key, Get returns KVPair{}, ErrNotExist.
func (Store) GetAll ¶
GetAll returns a KVPair for all nodes with keys matching pattern. The syntax of patterns is the same as in filepath.Match.
Click to show internal directories.
Click to hide internal directories.