kvstore

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExist = errors.New("key does not exist")

Functions

func NewInMemorySqliteDbForKvStore added in v1.11.0

func NewInMemorySqliteDbForKvStore(t testing.TB) *sql.DB

func NewSqliteDbForKvStore added in v1.11.0

func NewSqliteDbForKvStore(db string) (*sql.DB, error)

func NewSqliteKVStore

func NewSqliteKVStore(dbpool *sql.DB, basename string) (*sqliteKvStoreImpl, error)

Types

type KvStore

type KvStore interface {
	// Get retrieves the value for the given key.
	Get(key string) ([]byte, error)
	// Set sets the value for the given key.
	Set(key string, value []byte) error
	// ForEach iterates over all key-value pairs with the given prefix.
	ForEach(prefix string, onRow func(key string, value []byte) error) error
}

Jump to

Keyboard shortcuts

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