Versions in this module Expand all Collapse all v1 v1.1.0 Apr 12, 2019 Changes in this version + type Context struct + type EventHub struct + func FromConfig(ctx Context, peerCfg *apiconfig.PeerConfig) (*EventHub, error) + func New(ctx Context) (*EventHub, error) + func (eventHub *EventHub) Connect() error + func (eventHub *EventHub) Disconnect() error + func (eventHub *EventHub) Disconnected(err error) + func (eventHub *EventHub) GetInterestedEvents() ([]*pb.Interest, error) + func (eventHub *EventHub) IsConnected() bool + func (eventHub *EventHub) Recv(msg *pb.Event) (bool, error) + func (eventHub *EventHub) RegisterBlockEvent(callback func(*common.Block)) + func (eventHub *EventHub) RegisterChaincodeEvent(ccid string, eventname string, callback func(*fab.ChaincodeEvent)) *fab.ChainCodeCBE + func (eventHub *EventHub) RegisterTxEvent(txnID fab.TransactionID, callback func(string, pb.TxValidationCode, error)) + func (eventHub *EventHub) SetInterests(block bool) + func (eventHub *EventHub) SetPeerAddr(peerURL string, peerTLSCertificate *sm2.Certificate, ...) + func (eventHub *EventHub) UnregisterBlockEvent(callback func(*common.Block)) + func (eventHub *EventHub) UnregisterChaincodeEvent(cbe *fab.ChainCodeCBE) + func (eventHub *EventHub) UnregisterTxEvent(txnID fab.TransactionID) + type MockCCBlockEventBuilder struct + CCID string + ChannelID string + EventName string + Payload []byte + TxID string + func (b *MockCCBlockEventBuilder) Build() *pb.Event_Block + func (b *MockCCBlockEventBuilder) BuildWithTxValidationFlag(isValid bool) *pb.Event_Block + type MockCCEventBuilder struct + CCID string + EventName string + Payload []byte + func (b *MockCCEventBuilder) Build() *pb.Event_ChaincodeEvent + type MockTxEventBuilder struct + ChannelID string + TxID string + func (b *MockTxEventBuilder) Build() *pb.Event_Block + func (b *MockTxEventBuilder) BuildWithTxValidationCode(c pb.TxValidationCode) *pb.Event_Block