Documentation ¶
Index ¶
- type StreamingService
- func (fss *StreamingService) Close() error
- func (fss *StreamingService) ListenBeginBlock(ctx context.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error
- func (fss *StreamingService) ListenCommit(ctx context.Context, res abci.ResponseCommit) error
- func (fss *StreamingService) ListenDeliverTx(ctx context.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx) error
- func (fss *StreamingService) ListenEndBlock(ctx context.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock) error
- func (fss *StreamingService) Listeners() map[types.StoreKey][]types.WriteListener
- func (fss *StreamingService) Stream(wg *sync.WaitGroup) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StreamingService ¶
type StreamingService struct {
// contains filtered or unexported fields
}
StreamingService is a concrete implementation of StreamingService that writes state changes out to files.
func NewStreamingService ¶
func (*StreamingService) Close ¶
func (fss *StreamingService) Close() error
Close satisfies the StreamingService interface. It performs a no-op.
func (*StreamingService) ListenBeginBlock ¶
func (fss *StreamingService) ListenBeginBlock(ctx context.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error
ListenBeginBlock satisfies the ABCIListener interface. It sets the received BeginBlock request, response and the current block number. Note, these are not written to file until ListenCommit is executed and outputMetadata is set, after which it will be reset again on the next block.
func (*StreamingService) ListenCommit ¶
func (fss *StreamingService) ListenCommit(ctx context.Context, res abci.ResponseCommit) error
ListenCommit satisfies the ABCIListener interface. It is executed during the ABCI Commit request and is responsible for writing all staged data to files. It will only return a non-nil error when stopNodeOnErr is set.
func (*StreamingService) ListenDeliverTx ¶
func (fss *StreamingService) ListenDeliverTx(ctx context.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx) error
ListenDeliverTx satisfies the ABCIListener interface. It appends the received DeliverTx request and response to a list of DeliverTxs objects. Note, these are not written to file until ListenCommit is executed and outputMetadata is set, after which it will be reset again on the next block.
func (*StreamingService) ListenEndBlock ¶
func (fss *StreamingService) ListenEndBlock(ctx context.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock) error
ListenEndBlock satisfies the ABCIListener interface. It sets the received EndBlock request, response and the current block number. Note, these are not written to file until ListenCommit is executed and outputMetadata is set, after which it will be reset again on the next block.
func (*StreamingService) Listeners ¶
func (fss *StreamingService) Listeners() map[types.StoreKey][]types.WriteListener
Listeners satisfies the StreamingService interface. It returns the StreamingService's underlying WriteListeners. Use for registering the underlying WriteListeners with the BaseApp.