fabric: github.com/hyperledger/fabric/common/ledger Index | Files | Directories

package ledger

import "github.com/hyperledger/fabric/common/ledger"

Index

Package Files

ledger_interface.go

type Ledger Uses

type Ledger interface {
    // GetBlockchainInfo returns basic info about blockchain
    GetBlockchainInfo() (*common.BlockchainInfo, error)
    // GetBlockByNumber returns block at a given height
    // blockNumber of  math.MaxUint64 will return last block
    GetBlockByNumber(blockNumber uint64) (*common.Block, error)
    // GetBlocksIterator returns an iterator that starts from `startBlockNumber`(inclusive).
    // The iterator is a blocking iterator i.e., it blocks till the next block gets available in the ledger
    // ResultsIterator contains type BlockHolder
    GetBlocksIterator(startBlockNumber uint64) (ResultsIterator, error)
    // Close closes the ledger
    Close()
}

Ledger captures the methods that are common across the 'PeerLedger', 'OrdererLedger', and 'ValidatedLedger'

type PrunePolicy Uses

type PrunePolicy interface{}

PrunePolicy - a general interface for supporting different pruning policies

type QueryResult Uses

type QueryResult interface{}

QueryResult - a general interface for supporting different types of query results. Actual types differ for different queries

type QueryResultsIterator Uses

type QueryResultsIterator interface {
    ResultsIterator
    GetBookmarkAndClose() string
}

QueryResultsIterator - an iterator for query result set

type ResultsIterator Uses

type ResultsIterator interface {
    // Next returns the next item in the result set. The `QueryResult` is expected to be nil when
    // the iterator gets exhausted
    Next() (QueryResult, error)
    // Close releases resources occupied by the iterator
    Close()
}

ResultsIterator - an iterator for query result set

Directories

PathSynopsis
blkstorage
blkstorage/fsblkstorage
blockledger
blockledger/file
blockledger/json
blockledger/mocksCode generated by mockery v1.0.0.
blockledger/ram
testutil
util
util/leveldbhelper

Package ledger imports 1 packages (graph) and is imported by 52 packages. Updated 2019-09-24. Refresh now. Tools for package owners.