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!
Click to show internal directories.
Click to hide internal directories.