Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.1.5
type Config struct { Engine string Config interface{} }
Config is the configuration used to create a new KV.
type KV ¶
type KV interface { // Set sets the value for the given key. Set(key string, value any, maxAge ...time.Duration) error // Get returns the value for the given key. Get(key string, value any) error // Delete deletes the value for the given key. Delete(key string) error // Has returns true if the given key exists in the kv. Has(key string) bool // Keys returns the keys of the kv. Keys() []string // Size returns the number of entries in the kv. Size() int // Clear clears the kv. Clear() error // ForEach iterates over the map and calls the given function for each entry. ForEach(func(key string, value any)) }
KV is a Key-Value Store
Click to show internal directories.
Click to hide internal directories.