Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlocksDelivererFactory ¶
type BlocksDelivererFactory interface { // Create capable to instantiate new BlocksDeliverer Create() (blocksprovider.BlocksDeliverer, error) }
BlocksDelivererFactory the factory interface to create instance of BlocksDeliverer interface which capable to bring blocks from the ordering service
type DeliverService ¶
type DeliverService interface { // JoinChain once peer joins the chain it should need to check whenever // it has been selected as a leader and open connection to the configured // ordering service endpoint JoinChain(chainID string, ledgerInfo blocksprovider.LedgerInfo) error // Stop terminates delivery service and closes the connection Stop() }
DeliverService used to communicate with orderers to obtain new block and send the to the committer service
func NewDeliverService ¶
func NewDeliverService(gossip blocksprovider.GossipServiceAdapter) (DeliverService, error)
NewDeliverService construction function to create and initialize delivery service instance. It tries to establish connection to the specified in the configuration ordering service, in case it fails to dial to it, return nil
func NewFactoryDeliverService ¶
func NewFactoryDeliverService(gossip blocksprovider.GossipServiceAdapter, factory BlocksDelivererFactory, conn *grpc.ClientConn) DeliverService
NewFactoryDeliverService construction function to create and initialize delivery service instance, with gossip service adapter and customized factory to create blocks deliverers.