pebble

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "pebble"
)

Variables

This section is empty.

Functions

func OpenPath

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

Types

type DB

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

func OpenPathOptions added in v0.2.0

func OpenPathOptions(path string, opts *pebble.Options) (*DB, error)

OpenPathOptions is similar to OpenPath, but allow customizing Pebble options.

func (*DB) Close

func (db *DB) Close() error

func (*DB) DB

func (db *DB) DB() *pebble.DB

func (*DB) Tx

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

func (*DB) Update

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

func (*DB) View

func (db *DB) View(ctx context.Context, fn func(tx flat.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() flat.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 flat.Key) bool

func (*Iterator) Val

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

func (*Iterator) WithPrefix added in v0.2.0

func (it *Iterator) WithPrefix(pref flat.Key) flat.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 flat.Key) error

func (*Tx) Get

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

func (*Tx) GetBatch

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

func (*Tx) Put

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

func (*Tx) Scan

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

Jump to

Keyboard shortcuts

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