Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func GenSubID() string
 - func QueryForEventID(eventID string) query.Queryable
 - type Emitter
 - func (em *Emitter) Publish(ctx context.Context, message interface{}, tags query.Tagged) error
 - func (em *Emitter) SetLogger(logger *logging.Logger)
 - func (em *Emitter) Shutdown(ctx context.Context) error
 - func (em *Emitter) Subscribe(ctx context.Context, subscriber string, queryable query.Queryable, ...) (<-chan interface{}, error)
 - func (em *Emitter) Unsubscribe(ctx context.Context, subscriber string, queryable query.Queryable) error
 - func (em *Emitter) UnsubscribeAll(ctx context.Context, subscriber string) error
 
- type EventID
 
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 struct {
	common.BaseService
	// contains filtered or unexported fields
}
    Emitter has methods for working with events
func NewEmitter ¶ added in v0.18.0
func NewEmitter() *Emitter
NewEmitter initializes an emitter struct with a pubsubServer
func (*Emitter) Publish ¶ added in v0.25.0
Publish tells the emitter to publish with the given message and tags
func (*Emitter) Subscribe ¶ added in v0.25.0
func (em *Emitter) Subscribe(ctx context.Context, subscriber string, queryable query.Queryable, bufferSize int) (<-chan interface{}, error)
Subscribe tells the emitter to listen for messages on the given query
      
      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.