Documentation
¶
Index ¶
Constants ¶
View Source
const ( EventTypeKey = "EventType" EventIDKey = "EventID" MessageTypeKey = "MessageType" TxHashKey = "TxHash" HeightKey = "Height" IndexKey = "Index" StackDepthKey = "StackDepth" AddressKey = "Address" )
View Source
const DefaultEventBufferCapacity = 2 << 10
Variables ¶
This section is empty.
Functions ¶
func QueryForEventID ¶ added in v0.18.0
Get a query that matches events with a specific eventID
Types ¶
type Emitter ¶ added in v0.18.0
type Emitter interface {
Subscribable
Publisher
process.Process
}
func NewEmitter ¶ added in v0.18.0
type Publisher ¶ added in v0.18.0
type PublisherFunc ¶ added in v0.19.0
type Subscribable ¶ added in v0.18.0
type Subscribable interface {
// Subscribe to all events matching query, which is a valid tmlibs Query. Blocking the out channel blocks the entire
// pubsub.
Subscribe(ctx context.Context, subscriber string, queryable query.Queryable, bufferSize int) (out <-chan interface{}, err error)
// Unsubscribe subscriber from a specific query string. Note the subscribe channel must be drained.
Unsubscribe(ctx context.Context, subscriber string, queryable query.Queryable) error
UnsubscribeAll(ctx context.Context, subscriber string) error
}
TODO: manage the creation, closing, and draining of channels behind the interface rather than only closing. stop one subscriber from blocking everything!
Directories
¶
| Path | Synopsis |
|---|---|
|
This package was extracted from Tendermint Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
|
This package was extracted from Tendermint Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients). |
|
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
|
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar. |
Click to show internal directories.
Click to hide internal directories.