Documentation ¶
Overview ¶
Package mem implements an in-memory key-value store.
Index ¶
- type Store
- func (s *Store) Create(_ context.Context, name string, value []byte) error
- func (s *Store) Delete(_ context.Context, name string) error
- func (s *Store) Get(_ context.Context, name string) ([]byte, error)
- func (s *Store) List(ctx context.Context) (kms.Iter, error)
- func (s *Store) Status(_ context.Context) (kms.State, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶ added in v0.7.0
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory key-value store. Its zero value is ready to use.
func (*Store) Create ¶ added in v0.7.0
Create adds the given key to the store if and only if no entry for the given name exists. If an entry already exists it returns kes.ErrKeyExists.
func (*Store) Get ¶ added in v0.7.0
Get returns the key associated with the given name. If no entry for this name exists it returns kes.ErrKeyNotFound.
Click to show internal directories.
Click to hide internal directories.