Documentation ¶
Index ¶
- type Receiver
- func (mbc *Receiver) CurBatch() []*cb.Envelope
- func (mbc *Receiver) Cut() []*cb.Envelope
- func (mbc *Receiver) Ordered(env *cb.Envelope) ([][]*cb.Envelope, bool)
- func (mbc *Receiver) SetCutAncestors(cutAncestors bool)
- func (mbc *Receiver) SetCutNext(cutNext bool)
- func (mbc *Receiver) SetIsolatedTx(isolatedTx bool)
- func (mbc *Receiver) SkipAppendCurBatchSet(skipAppendCurBatch bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Receiver ¶
type Receiver struct { // Block is a channel which is read from before returning from Ordered, it is useful for synchronization // If you do not wish synchronization for whatever reason, simply close the channel Block chan struct{} // contains filtered or unexported fields }
Receiver mocks the blockcutter.Receiver interface
func NewReceiver ¶
func NewReceiver() *Receiver
NewReceiver returns the mock blockcutter.Receiver implementation
func (*Receiver) Ordered ¶
Ordered will add or cut the batch according to the state of Receiver, it blocks reading from Block on return
func (*Receiver) SetCutAncestors ¶
SetCutAncestors is used to change the cutAncestors field in a thread safe manner.
func (*Receiver) SetCutNext ¶
SetCutNext is used to change the cutNext field in a thread safe manner.
func (*Receiver) SetIsolatedTx ¶
SetIsolatedTx is used to change the isolatedTx field in a thread safe manner.
func (*Receiver) SkipAppendCurBatchSet ¶
SkipAppendCurBatchSet is used to change the skipAppendCurBatch field in a thread safe manner.
Click to show internal directories.
Click to hide internal directories.