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 ¶
Get a query that matches events with a specific eventID
Types ¶
type Publisher ¶
type PublisherFunc ¶
type Subscribable ¶
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.