Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockEvent ¶
BlockEvent contains the data for the block event
type EventService ¶
type EventService interface { FilteredEventService // RegisterBlockEvent registers for block events. If the client is not authorized to receive // block events then an error is returned. RegisterBlockEvent() (Registration, <-chan *BlockEvent, error) }
EventService is a service that receives events such as block, filtered block, chaincode, and transaction status events.
type FilteredBlockEvent ¶
type FilteredBlockEvent struct {
FilteredBlock *pb.FilteredBlock
}
FilteredBlockEvent contains the data for a filtered block event
type FilteredEventService ¶
type FilteredEventService interface { // RegisterFilteredBlockEvent registers for filtered block events. If the client is not authorized to receive // filtered block events then an error is returned. // - Returns the registration and a channel that is used to receive events RegisterFilteredBlockEvent() (Registration, <-chan *FilteredBlockEvent, error) // RegisterChaincodeEvent registers for chaincode events. If the client is not authorized to receive // chaincode events then an error is returned. // - ccID is the chaincode ID for which events are to be received // - eventFilter is the chaincode event filter (regular expression) for which events are to be received RegisterChaincodeEvent(ccID, eventFilter string) (Registration, <-chan *CCEvent, error) // RegisterTxStatusEvent registers for transaction status events. If the client is not authorized to receive // transaction status events then an error is returned. // - txID is the transaction ID for which events are to be received RegisterTxStatusEvent(txID string) (Registration, <-chan *TxStatusEvent, error) // Unregister unregisters the given registration. // - reg is the registration handle that was returned from one of the RegisterXXX functions Unregister(reg Registration) }
FilteredEventService is a service that receives events such as filtered block, chaincode, and transaction status events.
type Registration ¶
type Registration interface{}
Registration is a handle that is returned from a successful RegisterXXXEvent. This handle should be used in Unregister in order to unregister the event.
type RegistrationResponse ¶
type RegistrationResponse struct { // Reg is a handle to the registration Reg Registration // Err contains the error if registration is unsuccessful Err error }
RegistrationResponse is the response that is returned for any register/unregister event. For a successful registration, the registration handle is set. This handle should be used in a subsequent Unregister request. If an error occurs then the error is set.
type TxStatusEvent ¶
type TxStatusEvent struct { TxID string TxValidationCode pb.TxValidationCode }
TxStatusEvent contains the data for a transaction status event