Documentation ¶
Overview ¶
Package memstore implements the blob.Store interface using a map.
Index ¶
- func Opener(_ context.Context, _ string) (blob.Store, error)
- type Store
- func (s *Store) Clear()
- func (*Store) Close(context.Context) error
- func (s *Store) Delete(_ context.Context, key string) error
- func (s *Store) Get(_ context.Context, key string) ([]byte, error)
- func (s *Store) Init(m map[string]string) *Store
- func (s *Store) Len(context.Context) (int64, error)
- func (s *Store) List(_ context.Context, start string, f func(string) error) error
- func (s *Store) Put(_ context.Context, opts blob.PutOptions) error
- func (s *Store) Size(_ context.Context, key string) (int64, error)
- func (s *Store) Snapshot(m map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the blob.Store interface using an in-memory dictionary. The contents of a Store are not persisted. All operations on a memstore are safe for concurrent use by multiple goroutines.
func (*Store) Init ¶ added in v0.4.0
Init replaces the contents of s with the keys and values in m. It returns s to permit chaining with construction.
Click to show internal directories.
Click to hide internal directories.