We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51924bd commit 5ba2d52Copy full SHA for 5ba2d52
memkv/internal/underlying/underlying.go
@@ -1,5 +1,9 @@
1
// Package underlying provides the underlying data structures for the key-value
2
// store.
3
+//
4
+// This makes it easy to extend out the data structures in the future and
5
+// enables easy testing of the store's underlying data via memkv.Store.Data
6
+// (see memkv_export_test.go).
7
package underlying
8
9
// Item is a wrapper around the instances of data to be stored allowing for
memkv/memkv.go
@@ -1,3 +1,4 @@
+// Package memkv provides a generic in-memory key-value store.
package memkv
import (
@@ -8,6 +9,7 @@ import (
10
// Store is a generic in-memory key-value store.
11
type Store[K comparable, V any] struct {
12
+ // TODO: should this be part of the underlying data?
13
mu *sync.RWMutex
14
capacity int
15
data *underlying.Data[K, V]
0 commit comments