Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasListener ¶
func PostEvent ¶
func PostEvent(eType string, event interface{})
TODO channel to be passed to actions Puts event with given type and data on the channel
func RegisterEventListener ¶
func RegisterEventListener(evtListener EventListener, eventTypes []string) error
Registers listener for given event types
func UnRegisterEventListener ¶
Unregister event listener for given event types . To unregister from all event types, set eventTypes to nil
Types ¶
type EventContext ¶
type EventContext struct {
// contains filtered or unexported fields
}
EventContext is a wrapper over specific event
func (*EventContext) GetEvent ¶
func (ec *EventContext) GetEvent() interface{}
Returns wrapped event data
type EventListener ¶
type EventListener interface { // Returns name of the listener Name() string // Called when matching event occurs HandleEvent(*EventContext) error }
Click to show internal directories.
Click to hide internal directories.