events

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSubID

func GenSubID() string

func QueryForTx

func QueryForTx(txHash []byte) *tmQuery.Query

func TagsForTx

func TagsForTx(txHash []byte) tmPubSub.TagMap

Types

type EventBus

type EventBus interface {
	Start() error
	Stop() error
	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
	Publish(msg interface{}, tags tmPubSub.TagMap) error
}

func NewEventBus

func NewEventBus() EventBus

NewEventBus returns a new event bus.

func NewEventBusWithBufferCapacity

func NewEventBusWithBufferCapacity(cap int) EventBus

NewEventBusWithBufferCapacity returns a new event bus with the given buffer capacity.

func NewNopeEventBus

func NewNopeEventBus() EventBus

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL