Documentation
¶
Overview ¶
Package memory provides a memory storage implementation.
Index ¶
- type Config
- type Storage
- func (s *Storage) Delete(ctx context.Context, k microstorage.K) error
- func (s *Storage) Exists(ctx context.Context, k microstorage.K) (bool, error)
- func (s *Storage) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
- func (s *Storage) Put(ctx context.Context, kv microstorage.KV) error
- func (s *Storage) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { }
Config represents the configuration used to create a memory backed storage.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig provides a default configuration to create a new memory backed storage by best effort.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the memory backed storage.
func (*Storage) List ¶
func (s *Storage) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
func (*Storage) Search ¶
func (s *Storage) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
Click to show internal directories.
Click to hide internal directories.