Documentation ¶
Index ¶
- Variables
- type KVPair
- type KVPairs
- type KeyError
- 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) GetAllKVs() KVPairs
- func (s *Store) GetAllValues(pattern string) ([]string, error)
- func (s *Store) GetValue(key string, v ...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 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 path.Match.
func (*Store) GetValue ¶
GetValue gets the value associated with key. If there are no values associated with key, GetValue returns "", ErrNotExist.
Click to show internal directories.
Click to hide internal directories.