Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("internal: Loader: not found")
Functions ¶
func LoadDefault ¶
func LoadDefault[K comparable, V any](l Loader[K, V], key K, d V) (value V, err error)
Types ¶
type LevelDBProvider ¶
type LevelDBProvider[K comparable, V any] struct { DB *leveldb.DB ReadOptions *opt.ReadOptions WriteOptions *opt.WriteOptions }
func (LevelDBProvider[K, V]) Load ¶
func (prov LevelDBProvider[K, V]) Load(key K) (value V, err error)
func (LevelDBProvider[K, V]) Store ¶
func (prov LevelDBProvider[K, V]) Store(key K, value V) error
type LoadStorer ¶
type LoadStorer[K comparable, V any] interface { Loader[K, V] Storer[K, V] }
type Loader ¶
type Loader[K comparable, V any] interface { Load(key K) (value V, err error) }
type Storer ¶
type Storer[K comparable, V any] interface { Store(key K, value V) error }
Click to show internal directories.
Click to hide internal directories.