bbolt

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "bbolt"
)

Variables

This section is empty.

Functions

func OpenPath

func OpenPath(path string) (kv.KV, error)

Types

type DB

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

func New

func New(d *bolt.DB) *DB

func Open

func Open(path string, opt *bolt.Options) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) DB

func (db *DB) DB() *bolt.DB

func (*DB) Tx

func (db *DB) Tx(ctx context.Context, rw bool) (kv.Tx, error)

func (*DB) Update

func (db *DB) Update(ctx context.Context, fn func(tx kv.Tx) error) error

func (*DB) View

func (db *DB) View(ctx context.Context, fn func(tx kv.Tx) error) error

type Iterator

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Err

func (it *Iterator) Err() error

func (*Iterator) Key

func (it *Iterator) Key() kv.Key

func (*Iterator) Next

func (it *Iterator) Next(ctx context.Context) bool

func (*Iterator) Reset added in v0.2.0

func (it *Iterator) Reset()

func (*Iterator) Seek added in v0.2.0

func (it *Iterator) Seek(ctx context.Context, key kv.Key) bool

func (*Iterator) Val

func (it *Iterator) Val() kv.Value

func (*Iterator) WithPrefix added in v0.2.0

func (it *Iterator) WithPrefix(pref kv.Key) kv.Iterator

type Tx

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

func (*Tx) Close

func (tx *Tx) Close() error

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) Del

func (tx *Tx) Del(ctx context.Context, k kv.Key) error

func (*Tx) Get

func (tx *Tx) Get(ctx context.Context, key kv.Key) (kv.Value, error)

func (*Tx) GetBatch

func (tx *Tx) GetBatch(ctx context.Context, keys []kv.Key) ([]kv.Value, error)

func (*Tx) Put

func (tx *Tx) Put(ctx context.Context, k kv.Key, v kv.Value) error

func (*Tx) Scan

func (tx *Tx) Scan(ctx context.Context, opts ...kv.IteratorOption) kv.Iterator

Jump to

Keyboard shortcuts

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