badger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB added in v0.3.0

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

func OpenDB

func OpenDB(opts Opts, config driver.Config) (*DB, error)

func (*DB) BeginUpdate added in v0.3.0

func (db *DB) BeginUpdate() error

func (*DB) Close added in v0.3.0

func (db *DB) Close() error

func (*DB) Commit added in v0.3.0

func (db *DB) Commit() error

func (*DB) DeleteState added in v0.3.0

func (db *DB) DeleteState(namespace, key string) error

func (*DB) Discard added in v0.3.0

func (db *DB) Discard() error

func (*DB) GetState added in v0.3.0

func (db *DB) GetState(namespace, key string) ([]byte, uint64, uint64, error)

func (*DB) GetStateMetadata added in v0.3.0

func (db *DB) GetStateMetadata(namespace, key string) (map[string][]byte, uint64, uint64, error)

func (*DB) GetStateRangeScanIterator added in v0.3.0

func (db *DB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (driver.VersionedResultsIterator, error)

func (*DB) NewWriteTransaction added in v0.3.0

func (db *DB) NewWriteTransaction() (driver.WriteTransaction, error)

func (*DB) SetState added in v0.3.0

func (db *DB) SetState(namespace, key string, value []byte, block, txnum uint64) error

func (*DB) SetStateMetadata added in v0.3.0

func (db *DB) SetStateMetadata(namespace, key string, metadata map[string][]byte, block, txnum uint64) error

type Driver

type Driver struct{}

func (*Driver) New

func (v *Driver) New(sp view.ServiceProvider, dataSourceName string, config driver.Config) (driver.Persistence, error)

func (*Driver) NewTransactionalVersionedPersistence added in v0.3.0

func (o *Driver) NewTransactionalVersionedPersistence(sp view.ServiceProvider, dataSourceName string, config driver.Config) (driver.TransactionalVersionedPersistence, error)

NewTransactionalVersionedPersistence returns a new TransactionalVersionedPersistence for the passed data source and config

func (*Driver) NewVersioned

func (v *Driver) NewVersioned(sp view.ServiceProvider, dataSourceName string, config driver.Config) (driver.VersionedPersistence, error)

type Opts

type Opts struct {
	badger.Options
	Path string
}

type WriteTransaction added in v0.3.0

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

func (*WriteTransaction) Commit added in v0.3.0

func (w *WriteTransaction) Commit() error

func (*WriteTransaction) Discard added in v0.3.0

func (w *WriteTransaction) Discard() error

func (*WriteTransaction) SetState added in v0.3.0

func (w *WriteTransaction) SetState(namespace, key string, value []byte, block, txnum uint64) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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