fabric: github.com/hyperledger/fabric/core/ledger/kvledger/history/historydb Index | Files | Directories

package historydb

import "github.com/hyperledger/fabric/core/ledger/kvledger/history/historydb"

Index

Package Files

histmgr_helper.go historydb.go

Variables

var CompositeKeySep = []byte{0x00}

CompositeKeySep is a nil byte used as a separator between different components of a composite key

func ConstructCompositeHistoryKey Uses

func ConstructCompositeHistoryKey(ns string, key string, blocknum uint64, trannum uint64) []byte

ConstructCompositeHistoryKey builds the History Key of namespace~key~blocknum~trannum using an order preserving encoding so that history query results are ordered by height

func ConstructPartialCompositeHistoryKey Uses

func ConstructPartialCompositeHistoryKey(ns string, key string, endkey bool) []byte

ConstructPartialCompositeHistoryKey builds a partial History Key namespace~key~ for use in history key range queries

func SplitCompositeHistoryKey Uses

func SplitCompositeHistoryKey(bytesToSplit []byte, separator []byte) ([]byte, []byte)

SplitCompositeHistoryKey splits the key bytes using a separator

type HistoryDB Uses

type HistoryDB interface {
    NewHistoryQueryExecutor(blockStore blkstorage.BlockStore) (ledger.HistoryQueryExecutor, error)
    Commit(block *common.Block) error
    GetLastSavepoint() (*version.Height, error)
    ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error)
    CommitLostBlock(blockAndPvtdata *ledger.BlockAndPvtData) error
    Name() string
}

HistoryDB - an interface that a history database should implement

type HistoryDBProvider Uses

type HistoryDBProvider interface {
    // GetDBHandle returns a handle to a HistoryDB
    GetDBHandle(id string) (HistoryDB, error)
    // Close closes all the HistoryDB instances and releases any resources held by HistoryDBProvider
    Close()
}

HistoryDBProvider provides an instance of a history DB

Directories

PathSynopsis
historyleveldb
historyleveldb/fakesCode generated by counterfeiter.

Package historydb imports 6 packages (graph) and is imported by 8 packages. Updated 2019-09-29. Refresh now. Tools for package owners.