Documentation ¶
Overview ¶
Package memory implements a fully in-memory key/value store for the database to use.
Index ¶
- func NewKV(l hclog.Logger) (db.KVStore, error)
- type KV
- func (kv *KV) Capabilities() []db.KVCapability
- func (kv *KV) Close() error
- func (kv *KV) Del(_ context.Context, k string) error
- func (kv *KV) Get(_ context.Context, k string) ([]byte, error)
- func (kv *KV) Keys(_ context.Context, filter string) ([]string, error)
- func (kv *KV) Put(_ context.Context, k string, v []byte) error
- func (kv *KV) SetEventFunc(ef func(db.Event))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KV ¶
KV is a fully in-memory KV store. It is intended to be used with integration tests, not in production. It is not included in release builds by default.
func (*KV) Capabilities ¶
func (kv *KV) Capabilities() []db.KVCapability
Capabilities is used to interrogate a KV store for capabilities.
func (*KV) Keys ¶
Keys returns a set of keys optionally filtered by the filter expression. filter should be a regex/shell type glob.
func (*KV) SetEventFunc ¶
SetEventFunc supplies the event firing entrypoing for this implementation.
Click to show internal directories.
Click to hide internal directories.