Documentation ¶
Index ¶
- type Provider
- type Publisher
- func (p *Publisher) AddBlockHandler(handler api.PublishedBlockHandler)
- func (p *Publisher) AddCCEventHandler(handler api.ChaincodeEventHandler)
- func (p *Publisher) AddCCUpgradeHandler(handler api.ChaincodeUpgradeHandler)
- func (p *Publisher) AddCollHashReadHandler(handler api.CollHashReadHandler)
- func (p *Publisher) AddCollHashWriteHandler(handler api.CollHashWriteHandler)
- func (p *Publisher) AddConfigUpdateHandler(handler api.ConfigUpdateHandler)
- func (p *Publisher) AddLSCCWriteHandler(handler api.LSCCWriteHandler)
- func (p *Publisher) AddReadHandler(handler api.ReadHandler)
- func (p *Publisher) AddWriteHandler(handler api.WriteHandler)
- func (p *Publisher) Close()
- func (p *Publisher) Publish(block *cb.Block, pvtData ledger.TxPvtDataMap)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider maintains a cache of Block Publishers - one per channel
func (*Provider) ChannelJoined ¶ added in v0.1.1
ChannelJoined is invoked when the peer joins a channel. This function initializes the value of lastCommittedBlock for the channel.
func (*Provider) ForChannel ¶
func (p *Provider) ForChannel(channelID string) api.BlockPublisher
ForChannel returns the block publisher for the given channel
func (*Provider) Initialize ¶ added in v0.1.1
func (p *Provider) Initialize(ledgerProvider collcommon.LedgerProvider) *Provider
Initialize is called by the resource manager to initialize the block publisher provider
type Publisher ¶
type Publisher struct { *blockvisitor.Visitor // contains filtered or unexported fields }
Publisher traverses a block and publishes KV read, KV write, and chaincode events to registered handlers
func (*Publisher) AddBlockHandler ¶ added in v0.1.6
func (p *Publisher) AddBlockHandler(handler api.PublishedBlockHandler)
AddBlockHandler adds a handler for published blocks
func (*Publisher) AddCCEventHandler ¶
func (p *Publisher) AddCCEventHandler(handler api.ChaincodeEventHandler)
AddCCEventHandler adds a new handler for chaincode events
func (*Publisher) AddCCUpgradeHandler ¶
func (p *Publisher) AddCCUpgradeHandler(handler api.ChaincodeUpgradeHandler)
AddCCUpgradeHandler adds a handler for chaincode upgrade events
func (*Publisher) AddCollHashReadHandler ¶ added in v0.1.4
func (p *Publisher) AddCollHashReadHandler(handler api.CollHashReadHandler)
AddCollHashReadHandler adds a new handler for KV collection hash reads
func (*Publisher) AddCollHashWriteHandler ¶ added in v0.1.4
func (p *Publisher) AddCollHashWriteHandler(handler api.CollHashWriteHandler)
AddCollHashWriteHandler adds a new handler for KV collection hash writes
func (*Publisher) AddConfigUpdateHandler ¶
func (p *Publisher) AddConfigUpdateHandler(handler api.ConfigUpdateHandler)
AddConfigUpdateHandler adds a handler for config update events
func (*Publisher) AddLSCCWriteHandler ¶
func (p *Publisher) AddLSCCWriteHandler(handler api.LSCCWriteHandler)
AddLSCCWriteHandler adds a handler for chaincode instantiation/upgrade events
func (*Publisher) AddReadHandler ¶
func (p *Publisher) AddReadHandler(handler api.ReadHandler)
AddReadHandler adds a new handler for KV reads
func (*Publisher) AddWriteHandler ¶
func (p *Publisher) AddWriteHandler(handler api.WriteHandler)
AddWriteHandler adds a new handler for KV writes