internal

package
v0.0.0-...-4add98c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL