Documentation
¶
Index ¶
Constants ¶
View Source
const ( InMemory = iota BoltDB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValueStore ¶
type KeyValueStore[K, V any] interface { ReadOnlyKeyValueStore[K, V] Put(key K, value V) Delete(key K) }
func NewKeyValueStore ¶
func NewKeyValueStore[K, V any](opts Options[K, V]) KeyValueStore[K, V]
type Option ¶
type Option[K, V any] func(*options[K, V])
func WithBoltDB ¶
WithBoltDB use boltDB persistent store.
func WithDirPath ¶
func WithInMemory ¶
WithInMemory use in-memory store. default store type.
func WithKeySerde ¶
WithKeySerde set custom key serializer/deserializer. default is json serde.
func WithValueSerde ¶
WithValueSerde set custom value serializer/deserializer. default is json serde.
type Options ¶
type Options[K, V any] interface { KeySerde() Serde[K] ValueSerde() Serde[V] StoreType() StoreType Name() string DirPath() string }
func NewOptions ¶
type ReadOnlyKeyValueStore ¶
Click to show internal directories.
Click to hide internal directories.