bring back EventSubscriber

This commit is contained in:
Anton Kaliaev
2019-02-01 15:28:25 +04:00
parent 1be7e341b1
commit 4257407aea
9 changed files with 97 additions and 46 deletions

View File

@ -21,10 +21,7 @@ implementation.
*/
import (
"context"
cmn "github.com/tendermint/tendermint/libs/common"
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/types"
)
@ -94,9 +91,7 @@ type NetworkClient interface {
// EventsClient is reactive, you can subscribe to any message, given the proper
// string. see tendermint/types/events.go
type EventsClient interface {
Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, out chan<- interface{}) error
Unsubscribe(ctx context.Context, subscriber string, query tmpubsub.Query) error
UnsubscribeAll(ctx context.Context, subscriber string) error
types.EventBusSubscriber
}
// MempoolClient shows us data about current mempool state.