Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
EventHandler interface for describing any object that should be notified upon some Event has happened.
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
EventPublisher central structure for notifying all EventHandler.
func NewEventPublisher ¶
func NewEventPublisher() *EventPublisher
NewEventPublisher creates a new event publisher.
func (*EventPublisher) Notify ¶
func (e *EventPublisher) Notify(event Event) error
Notify notifies subscribed EventHandler for particular Event.
func (*EventPublisher) Subscribe ¶
func (e *EventPublisher) Subscribe(handler EventHandler, events ...Event)
Subscribe subscribes EventHandler to particular Events,
Click to show internal directories.
Click to hide internal directories.