Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func NewEventBus ¶
func NewEventBus() *EventBus
func (*EventBus) Register ¶
func (e *EventBus) Register(evt string, sub Subscriber)
func (*EventBus) Unregister ¶
func (e *EventBus) Unregister(evt string, sub Subscriber)
type Subscriber ¶
type Subscriber interface {
OnEvent(evt string, data interface{})
}
Click to show internal directories.
Click to hide internal directories.