Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotFoundError ¶
type NotFoundError struct {
Key string
}
NotFoundError is returned when a key is not found in the store.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Store ¶
type Store[T any] interface { // Get returns the value associated with the given key or an error. Get(key string) (T, error) // Replace replaces the contents of the store with the given map. Replace(map[string]T) }
Store is a generic key value store. Implementations should be safe for concurrent use. It is basically just a map with a lock. Does not yet implement Set so we don't have to worry about this thing growing without bound.
Click to show internal directories.
Click to hide internal directories.