Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Receiver ¶
type Receiver interface { // Ordered should be invoked sequentially as messages are ordered // If the current message valid, and no batches need to be cut: // - Ordered will return (nil, true) (indicating ok). // If the current message is valid, and batches need to be cut: // - Ordered will return 1 or 2 batches of messages, and true (indicating ok). // If the current message is invalid: // - Ordered will return (nil, false) (to indicate not ok). // // Given a valid message, if the current message needs to be isolated because it exceeds the preferred batch size // - Ordered will return: // * The pending batch (if not empty), and a second batch containing only the isolated message. // * true (indicating ok). // Otherwise, given a valid message, the pending batch, if not empty, will be cut and returned if: // - The current message will cause the pending batch size in bytes to exceed BatchSize.PreferredMaxBytes. // - After adding the current message to the pending batch, the message count has reached BatchSize.MaxMessageCount. Ordered(msg *cb.Envelope) ([][]*cb.Envelope, bool) // Cut returns the current batch and starts a new one Cut() []*cb.Envelope }
Receiver defines a sink for the ordered broadcast messages
func NewReceiverImpl ¶
NewReceiverImpl creates a Receiver implementation based on the given configtxorderer manager
Click to show internal directories.
Click to hide internal directories.