history

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB maintains and provides access to history data for a particular channel

func (*DB) Commit

func (d *DB) Commit(block *common.Block) error

Commit implements method in HistoryDB interface

func (*DB) CommitLostBlock

func (d *DB) CommitLostBlock(blockAndPvtdata *ledger.BlockAndPvtData) error

CommitLostBlock implements method in interface kvledger.Recoverer

func (*DB) GetLastSavepoint

func (d *DB) GetLastSavepoint() (*version.Height, error)

GetLastSavepoint implements returns the height till which the history is present in the db

func (*DB) Name

func (d *DB) Name() string

Name returns the name of the database that manages historical states.

func (*DB) NewQueryExecutor

func (d *DB) NewQueryExecutor(blockStore blkstorage.BlockStore) (ledger.HistoryQueryExecutor, error)

NewQueryExecutor implements method in HistoryDB interface

func (*DB) ShouldRecover

func (d *DB) ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error)

ShouldRecover implements method in interface kvledger.Recoverer

type DBProvider

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

DBProvider provides handle to HistoryDB for a given channel

func NewDBProvider

func NewDBProvider(path string) (*DBProvider, error)

NewDBProvider instantiates DBProvider

func (*DBProvider) Close

func (p *DBProvider) Close()

Close closes the underlying db

func (*DBProvider) GetDBHandle

func (p *DBProvider) GetDBHandle(name string) (*DB, error)

GetDBHandle gets the handle to a named database

type QueryExecutor

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

QueryExecutor is a query executor against the LevelDB history DB

func (*QueryExecutor) GetHistoryForKey

func (q *QueryExecutor) GetHistoryForKey(namespace string, key string) (commonledger.ResultsIterator, error)

GetHistoryForKey implements method in interface `ledger.HistoryQueryExecutor`

Jump to

Keyboard shortcuts

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