eventbus: plumb contexts (#7337)

* eventbus: plumb contexts

* fix lint
This commit is contained in:
Sam Kleinman
2021-11-30 14:24:11 +00:00
committed by GitHub
parent c9f90953a2
commit 4af2dbd03b
22 changed files with 276 additions and 233 deletions
+7 -6
View File
@@ -1,6 +1,7 @@
package types
import (
"context"
"fmt"
"strings"
@@ -241,13 +242,13 @@ func QueryForEvent(eventValue string) tmpubsub.Query {
// BlockEventPublisher publishes all block related events
type BlockEventPublisher interface {
PublishEventNewBlock(block EventDataNewBlock) error
PublishEventNewBlockHeader(header EventDataNewBlockHeader) error
PublishEventNewEvidence(evidence EventDataNewEvidence) error
PublishEventTx(EventDataTx) error
PublishEventValidatorSetUpdates(EventDataValidatorSetUpdates) error
PublishEventNewBlock(ctx context.Context, block EventDataNewBlock) error
PublishEventNewBlockHeader(ctx context.Context, header EventDataNewBlockHeader) error
PublishEventNewEvidence(ctx context.Context, evidence EventDataNewEvidence) error
PublishEventTx(context.Context, EventDataTx) error
PublishEventValidatorSetUpdates(context.Context, EventDataValidatorSetUpdates) error
}
type TxEventPublisher interface {
PublishEventTx(EventDataTx) error
PublishEventTx(context.Context, EventDataTx) error
}