Documentation ¶
Overview ¶
Package memorykv provides an in-memory implementation of kv.BinaryStore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryStore ¶ added in v0.8.0
type BinaryStore struct { // BeforeSet, if non-nil, is called before a value is set. BeforeSet func(ks string, k, v []byte) error // AfterSet, if non-nil, is called after a value is set. AfterSet func(ks string, k, v []byte) error // contains filtered or unexported fields }
BinaryStore is an implementation of [keyspace.BinaryStore] that stores records in memory.
func (*BinaryStore) Open ¶ added in v0.8.0
func (s *BinaryStore) Open(ctx context.Context, name string) (kv.BinaryKeyspace, error)
Open returns the keyspace with the given name.
type Store ¶
type Store[K comparable, V any] struct { // BeforeSet, if non-nil, is called before a value is set. BeforeSet func(ks string, k K, v V) error // AfterSet, if non-nil, is called after a value is set. AfterSet func(ks string, k K, v V) error // contains filtered or unexported fields }
Store is an in-memory implementation of kv.Store.
Click to show internal directories.
Click to hide internal directories.