blockcutter

package
v0.0.0-...-bef689d Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrdererConfigFetcher

type OrdererConfigFetcher interface {
	OrdererConfig() (channelconfig.Orderer, bool)
}

type Receiver

type Receiver interface {
	// Ordered should be invoked sequentially as messages are ordered
	// Each batch in `messageBatches` will be wrapped into a block.
	// `pending` indicates if there are still messages pending in the receiver. It
	// is useful for Kafka orderer to determine the `LastOffsetPersisted` of block.
	Ordered(msg *cb.Envelope) (messageBatches [][]*cb.Envelope, pending bool)

	// Cut returns the current batch and starts a new one
	Cut() []*cb.Envelope

	// Process the transaction and record the read/write set into a bitset.
	// Used to resolve transactional dependencies within the batch.
	ProcessTransaction(msg *cb.Envelope) bool

	// Process the current block and return (valid, invalid) two blocks.
	ProcessBlock() ([]*cb.Envelope, []*cb.Envelope)
}

Receiver defines a sink for the ordered broadcast messages

func NewReceiverImpl

func NewReceiverImpl(sharedConfigFetcher OrdererConfigFetcher) Receiver

NewReceiverImpl creates a Receiver implementation based on the given configtxorderer manager

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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