Versions in this module Expand all Collapse all v0 v0.7.2 Apr 16, 2020 v0.7.1 Apr 9, 2020 Changes in this version + var DefEvtHub *eventhub.EventHub + var DefPublisherPID *actor.PID + func Init() + type ActorPublisher struct + EvtHub *eventhub.EventHub + Publisher *actor.PID + var DefActorPublisher *ActorPublisher + func NewActorPublisher(publisher *actor.PID, evtHub ...*eventhub.EventHub) *ActorPublisher + func (this *ActorPublisher) Publish(topic string, msg interface{}) + func (this *ActorPublisher) PublishEvent(evt *eventhub.Event) + type ActorSubscriber struct + EvtHub *eventhub.EventHub + Subscriber *actor.PID + func NewActorSubscriber(subscriber *actor.PID, evtHub ...*eventhub.EventHub) *ActorSubscriber + func (this *ActorSubscriber) Subscribe(topic string) + func (this *ActorSubscriber) Unsubscribe(topic string) + type Event struct + func NewEvent() *Event + func (e *Event) Notify(eventtype EventType, value interface{}) (err error) + func (e *Event) NotifyAll() (errs []error) + func (e *Event) NotifySubscriber(eventfunc EventFunc, value interface{}) + func (e *Event) Subscribe(eventtype EventType, eventfunc EventFunc) Subscriber + func (e *Event) UnSubscribe(eventtype EventType, subscriber Subscriber) (err error) + type EventFunc func(v interface{}) + type EventType int16 + const EventBlockPersistCompleted + const EventNewInventory + const EventNodeConsensusDisconnect + const EventNodeDisconnect + const EventReplyTx + const EventSaveBlock + const EventSmartCode + type Subscriber chan interface