pebble

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage implements the db.Storage interface

func NewPebbleStorage

func NewPebbleStorage(path string, errorIfMissing bool) (*Storage, error)

NewPebbleStorage returns a new Storage

func (*Storage) Close

func (p *Storage) Close()

Close implements the method Close of the interface db.Storage

func (*Storage) Get

func (p *Storage) Get(key []byte) ([]byte, error)

Get retreives a value from a key in the db.Storage

func (*Storage) Iterate

func (p *Storage) Iterate(f func([]byte, []byte) (bool, error)) (err error)

Iterate implements the method Iterate of the interface db.Storage

func (*Storage) List

func (p *Storage) List(limit int) ([]db.KV, error)

List implements the method List of the interface db.Storage

func (*Storage) NewTx

func (p *Storage) NewTx() (db.Tx, error)

NewTx implements the method NewTx of the interface db.Storage

func (*Storage) Pebble

func (p *Storage) Pebble() *pebble.DB

Pebble is an extra method that returns the *pebble.DB

func (*Storage) WithPrefix

func (p *Storage) WithPrefix(prefix []byte) db.Storage

WithPrefix implements the method WithPrefix of the interface db.Storage

type StorageTx

type StorageTx struct {
	*Storage
	// contains filtered or unexported fields
}

StorageTx implements the db.Tx interface

func (*StorageTx) Add

func (tx *StorageTx) Add(atx db.Tx) error

Add implements the method Add of the interface db.Tx

func (*StorageTx) Close

func (tx *StorageTx) Close()

Close implements the method Close of the interface db.Tx

func (*StorageTx) Commit

func (tx *StorageTx) Commit() error

Commit implements the method Commit of the interface db.Tx

func (*StorageTx) Get

func (tx *StorageTx) Get(key []byte) ([]byte, error)

Get retreives a value from a key in the interface db.Tx

func (*StorageTx) Put

func (tx *StorageTx) Put(k, v []byte) error

Put saves a key:value into the db.Storage

Jump to

Keyboard shortcuts

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