Documentation ¶
Index ¶
Constants ¶
View Source
const EventChSize = 100
EventChSize is the size of subscriber's read channel.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶ added in v1.1.0
type Collector struct {
// contains filtered or unexported fields
}
Collector is the struct for posting event.
func GetCollector ¶ added in v1.1.0
func GetCollector() *Collector
GetCollector returns single-instance event collector.
func (*Collector) Subscribe ¶ added in v1.1.0
Subscribe registers a subscription in event collector.
func (*Collector) Unsubscribe ¶ added in v1.1.0
Unsubscribe deregisters a subscription from event collector.
type Meta ¶ added in v1.1.0
type Meta struct {
ContractID string
}
Meta is the information abount event.
type Subscription ¶
type Subscription struct { C chan<- *Event // contains filtered or unexported fields }
Subscription is a struct used for listening specific topics
Click to show internal directories.
Click to hide internal directories.