badger

package
v0.0.0-...-4334ecd Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "state::badger"

Variables

This section is empty.

Functions

This section is empty.

Types

type Badger

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

func (*Badger) ChangeSecretKey

func (b *Badger) ChangeSecretKey(path string, oldSecretKey []byte, newSecretKey []byte, encryptionKeyRotationDuration time.Duration) error

func (*Badger) Close

func (b *Badger) Close() error

func (*Badger) NewReadOnlyTransaction

func (b *Badger) NewReadOnlyTransaction() iface.IStateStorageTransaction

func (*Badger) NewTransaction

func (b *Badger) NewTransaction() iface.IStateStorageTransaction

func (*Badger) Open

func (b *Badger) Open() error

func (*Badger) RunGC

func (b *Badger) RunGC()

func (*Badger) Setup

func (b *Badger) Setup(path string, secretKey []byte, configuration interface{})

func (*Badger) StateStorageName

func (b *Badger) StateStorageName() string

type Configuration

type Configuration struct {
	SliceCap        int              `json:"sliceCap"`
	LogPrefix       string           `json:"logPrefix"`
	GoroutineNumber int              `json:"goroutineNumber"`
	BadgerOptions   badgerDb.Options `json:"badgerOptions"`
	GCDiscardRatio  float64          `json:"gcDiscardRatio"`
}

type Iterator

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

func (*Iterator) Close

func (i *Iterator) Close()

func (*Iterator) Next

func (i *Iterator) Next()

func (*Iterator) Rewind

func (i *Iterator) Rewind()

func (*Iterator) Seek

func (i *Iterator) Seek(address []byte)

func (*Iterator) StateSnapshot

func (i *Iterator) StateSnapshot() *pb.StateSnapshot

func (*Iterator) Valid

func (i *Iterator) Valid() bool

func (*Iterator) ValidForPrefix

func (i *Iterator) ValidForPrefix(prefix []byte) bool

type Transaction

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

func (*Transaction) Commit

func (t *Transaction) Commit() error

func (*Transaction) Delete

func (t *Transaction) Delete(address []byte) error

func (*Transaction) Discard

func (t *Transaction) Discard()

func (*Transaction) ForwardIterator

func (t *Transaction) ForwardIterator() iface.IStateStorageIterator

func (*Transaction) Get

func (t *Transaction) Get(address []byte) ([]byte, error)

func (*Transaction) KeyOnlyForwardIterator

func (t *Transaction) KeyOnlyForwardIterator() iface.IStateStorageIterator

func (*Transaction) KeyOnlyReverseIterator

func (t *Transaction) KeyOnlyReverseIterator() iface.IStateStorageIterator

func (*Transaction) ReverseIterator

func (t *Transaction) ReverseIterator() iface.IStateStorageIterator

func (*Transaction) Set

func (t *Transaction) Set(address []byte, data []byte) error

Jump to

Keyboard shortcuts

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