inmemory

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB is a naive store that stores values in memory. Do not use in production, changes are lost on restart.

func (*DB) Close

func (d *DB) Close() error

Close is a noop.

func (*DB) Get

func (d *DB) Get(ctx context.Context, key string) ([]byte, error)

func (*DB) GetKeys

func (d *DB) GetKeys(ctx context.Context, prefix string) ([]string, error)

func (*DB) NewTransaction

func (d *DB) NewTransaction(ctx context.Context, _ bool) (database.Transaction, context.Context, error)

func (*DB) Ping added in v0.5.1

func (d *DB) Ping(_ context.Context) error

func (*DB) Set

func (d *DB) Set(ctx context.Context, key string, value []byte) error

type Txn

type Txn struct {
	// contains filtered or unexported fields
}

func (*Txn) Commit

func (t *Txn) Commit() error

func (*Txn) Discard

func (t *Txn) Discard()

Jump to

Keyboard shortcuts

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