Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventListener ¶
type EventListener interface { // Register registers for a chaincode event Register(eventID string) error // BlockWait Block and wait for a chaincode event matching the previously registered eventID // Return cc event URL if event is received before timing out BlockWait(timeoutSeconds int, numMessages int) string // Close closes the listener and releases any assoicated resources Close() }
EventListener is a chaincode event handler
type EventListenerImpl ¶
type EventListenerImpl struct { ChannelID string ChaincodeID string // an optional extra delay to apply before unblocking // upon receipt of event notification // a small time gap before returning notification so that // data will be available at more peers already by the time notitfication is received NotificationDelayMilliseconds int // contains filtered or unexported fields }
EventListenerImpl is the default implementation of CCEventHandler
func (*EventListenerImpl) BlockWait ¶
func (t *EventListenerImpl) BlockWait(timeoutSeconds int, numMessages int) (ccEventURL string)
BlockWait Blocks and wait for a chaincode event
func (*EventListenerImpl) Close ¶
func (t *EventListenerImpl) Close()
Close closes the listener and releases any assoicated resources
func (*EventListenerImpl) Register ¶
func (t *EventListenerImpl) Register(eventID string) error
Register registers for a chaincode event
Click to show internal directories.
Click to hide internal directories.