Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetEventListener ¶
func SetEventListener(el *EventListener)
SetEventListener sets default EventListener (without instance).
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is default event implementation.
type EventListener ¶
type EventListener struct {
// contains filtered or unexported fields
}
EventListener sends out certain events to their subscribers.
func NewEventListener ¶
func NewEventListener() *EventListener
NewEventListener creates event listener.
func (*EventListener) Push ¶
func (el *EventListener) Push(title string, e Eventer)
Push sends a new event to its subscribers.
func (*EventListener) PushBytes ¶
func (el *EventListener) PushBytes(title string, bytes []byte)
PushBytes converts bytes to an event and executes Push
func (*EventListener) Subscribe ¶
func (el *EventListener) Subscribe(title string) chan Eventer
Subscribe creates a new chan and signs it for news, then returns.
Click to show internal directories.
Click to hide internal directories.