listener

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaincodeListener

type ChaincodeListener interface {
	// Listen for events
	Listen() (<-chan *fab.CCEvent, error)
	Stop()
}

ChaincodeListener listen for events emitted by fabric

func NewChaincodeListener

func NewChaincodeListener(source *EventSource) (ChaincodeListener, error)

NewChaincodeListener Create a new chaincode listener on the specified source

type EventSource

type EventSource struct {
	// ChannelID name of the channel to listen on
	ChannelID string
	// ChaincodeID chaincode that will emit the chaincode event
	ChaincodeID string
	// EventName name of the event
	EventName string
}

EventSource defines the source of an event

Jump to

Keyboard shortcuts

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