Documentation ¶
Index ¶
- type IntermediateWriter
- type StreamingService
- func (fss *StreamingService) Close() error
- func (fss *StreamingService) ListenBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error
- func (fss *StreamingService) ListenDeliverTx(ctx sdk.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx) error
- func (fss *StreamingService) ListenEndBlock(ctx sdk.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 IntermediateWriter ¶
type IntermediateWriter struct {
// contains filtered or unexported fields
}
IntermediateWriter is used so that we do not need to update the underlying io.Writer inside the StoreKVPairWriteListener everytime we begin writing to a new file
func NewIntermediateWriter ¶
func NewIntermediateWriter(outChan chan<- []byte) *IntermediateWriter
NewIntermediateWriter create an instance of an intermediateWriter that sends to the provided channel
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 NewStreamingService(writeDir, filePrefix string, storeKeys []types.StoreKey, c codec.BinaryCodec) (*StreamingService, error)
NewStreamingService creates a new StreamingService for the provided writeDir, (optional) filePrefix, and storeKeys
func (*StreamingService) Close ¶
func (fss *StreamingService) Close() error
Close satisfies the io.Closer interface, which satisfies the baseapp.StreamingService interface
func (*StreamingService) ListenBeginBlock ¶
func (fss *StreamingService) ListenBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error
ListenBeginBlock satisfies the baseapp.ABCIListener interface It writes the received BeginBlock request and response and the resulting state changes out to a file as described in the above the naming schema
func (*StreamingService) ListenDeliverTx ¶
func (fss *StreamingService) ListenDeliverTx(ctx sdk.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx) error
ListenDeliverTx satisfies the baseapp.ABCIListener interface It writes the received DeliverTx request and response and the resulting state changes out to a file as described in the above the naming schema
func (*StreamingService) ListenEndBlock ¶
func (fss *StreamingService) ListenEndBlock(ctx sdk.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock) error
ListenEndBlock satisfies the baseapp.ABCIListener interface It writes the received EndBlock request and response and the resulting state changes out to a file as described in the above the naming schema
func (*StreamingService) Listeners ¶
func (fss *StreamingService) Listeners() map[types.StoreKey][]types.WriteListener
Listeners satisfies the baseapp.StreamingService interface It returns the StreamingService's underlying WriteListeners Use for registering the underlying WriteListeners with the BaseApp
func (*StreamingService) Stream ¶
func (fss *StreamingService) Stream(wg *sync.WaitGroup) error
Stream satisfies the baseapp.StreamingService interface It spins up a goroutine select loop which awaits length-prefixed binary encoded KV pairs and caches them in the order they were received returns an error if it is called twice