fabric: github.com/hyperledger/fabric/core/deliverservice/blocksprovider Index | Files

package blocksprovider

import "github.com/hyperledger/fabric/core/deliverservice/blocksprovider"

Index

Package Files

blocksprovider.go

type BlocksDeliverer Uses

type BlocksDeliverer interface {
    // Recv retrieves a response from the ordering service
    Recv() (*orderer.DeliverResponse, error)

    // Send sends an envelope to the ordering service
    Send(*common.Envelope) error
}

BlocksDeliverer defines interface which actually helps to abstract the AtomicBroadcast_DeliverClient with only required method for blocks provider. This also decouples the production implementation of the gRPC stream from the code in order for the code to be more modular and testable.

type BlocksProvider Uses

type BlocksProvider interface {
    // DeliverBlocks starts delivering and disseminating blocks
    DeliverBlocks()

    // Stop shutdowns blocks provider and stops delivering new blocks
    Stop()
}

BlocksProvider used to read blocks from the ordering service for specified chain it subscribed to

func NewBlocksProvider Uses

func NewBlocksProvider(chainID string, client streamClient, gossip GossipServiceAdapter, mcs api.MessageCryptoService) BlocksProvider

NewBlocksProvider constructor function to create blocks deliverer instance

type GossipServiceAdapter Uses

type GossipServiceAdapter interface {
    // PeersOfChannel returns slice with members of specified channel
    PeersOfChannel(gossipcommon.ChainID) []discovery.NetworkMember

    // AddPayload adds payload to the local state sync buffer
    AddPayload(chainID string, payload *gossip_proto.Payload) error

    // Gossip the message across the peers
    Gossip(msg *gossip_proto.GossipMessage)
}

GossipServiceAdapter serves to provide basic functionality required from gossip service by delivery service

type LedgerInfo Uses

type LedgerInfo interface {
    // LedgerHeight returns current local ledger height
    LedgerHeight() (uint64, error)
}

LedgerInfo an adapter to provide the interface to query the ledger committer for current ledger height

Package blocksprovider imports 11 packages (graph) and is imported by 7 packages. Updated 2019-06-14. Refresh now. Tools for package owners.