github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/internal/state/indexer/sink/null/null.go (about) 1 package null 2 3 import ( 4 "context" 5 6 abci "github.com/ari-anchor/sei-tendermint/abci/types" 7 "github.com/ari-anchor/sei-tendermint/internal/pubsub/query" 8 "github.com/ari-anchor/sei-tendermint/internal/state/indexer" 9 "github.com/ari-anchor/sei-tendermint/types" 10 ) 11 12 var _ indexer.EventSink = (*EventSink)(nil) 13 14 // EventSink implements a no-op indexer. 15 type EventSink struct{} 16 17 func NewEventSink() indexer.EventSink { 18 return &EventSink{} 19 } 20 21 func (nes *EventSink) Type() indexer.EventSinkType { 22 return indexer.NULL 23 } 24 25 func (nes *EventSink) IndexBlockEvents(bh types.EventDataNewBlockHeader) error { 26 return nil 27 } 28 29 func (nes *EventSink) IndexTxEvents(results []*abci.TxResult) error { 30 return nil 31 } 32 33 func (nes *EventSink) SearchBlockEvents(ctx context.Context, q *query.Query) ([]int64, error) { 34 return nil, nil 35 } 36 37 func (nes *EventSink) SearchTxEvents(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) { 38 return nil, nil 39 } 40 41 func (nes *EventSink) GetTxByHash(hash []byte) (*abci.TxResult, error) { 42 return nil, nil 43 } 44 45 func (nes *EventSink) HasBlock(h int64) (bool, error) { 46 return false, nil 47 } 48 49 func (nes *EventSink) Stop() error { 50 return nil 51 }