pebbledb

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PebbleDB

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

PebbleDB implements db.Database interface

func New

func New(opts db.Options) (*PebbleDB, error)

New returns a PebbleDB using the given Options, which implements the db.Database interface

func (*PebbleDB) Close

func (db *PebbleDB) Close() error

Close closes the PebbleDB

func (*PebbleDB) Compact added in v1.9.0

func (db *PebbleDB) Compact() error

Compact implements the db.Database.Compact interface method

func (*PebbleDB) Get added in v1.9.0

func (db *PebbleDB) Get(k []byte) ([]byte, error)

Get implements the db.WriteTx.Get interface method

func (*PebbleDB) Iterate

func (db *PebbleDB) Iterate(prefix []byte, callback func(k, v []byte) bool) (err error)

Iterate implements the db.Database.Iterate interface method

func (*PebbleDB) WriteTx

func (db *PebbleDB) WriteTx() db.WriteTx

WriteTx returns a db.WriteTx

type WriteTx

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

WriteTx implements the interface db.WriteTx

func (*WriteTx) Apply

func (tx *WriteTx) Apply(other db.WriteTx) (err error)

Apply implements the db.WriteTx.Apply interface method

func (*WriteTx) Commit

func (tx *WriteTx) Commit() error

Commit implements the db.WriteTx.Commit interface method

func (*WriteTx) Delete

func (tx *WriteTx) Delete(k []byte) error

Delete implements the db.WriteTx.Delete interface method

func (*WriteTx) Discard

func (tx *WriteTx) Discard()

Discard implements the db.WriteTx.Discard interface method

func (*WriteTx) Get

func (tx *WriteTx) Get(k []byte) ([]byte, error)

Get implements the db.WriteTx.Get interface method

func (*WriteTx) Iterate added in v1.9.0

func (tx *WriteTx) Iterate(prefix []byte, callback func(k, v []byte) bool) (err error)

func (*WriteTx) Set

func (tx *WriteTx) Set(k, v []byte) error

Set implements the db.WriteTx.Set interface method

Jump to

Keyboard shortcuts

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