Documentation
¶
Overview ¶
Package events handles sending notifications to users and websockets when system events happen. Such as firing webhooks on workflow transitions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Stop = make(chan int)
Stop is a global channel used to stop the running event managers
Functions ¶
func RegisterListener ¶
RegisterListener calls the method of the same name on the global EventManager
Types ¶
type EventManager ¶
EventManager manages registered event listeners and dispatching those events
func (EventManager) FireEvent ¶
func (em EventManager) FireEvent(e event.Event)
FireEvent calls the method of the same name on the global EventManager
func (EventManager) RegisterListener ¶
func (em EventManager) RegisterListener(ev chan event.Event)
RegisterListener adds a listener to the EventManager
type ManagedWebsocket ¶
ManagedWebsocket wraps a websocket connection and should be managed inside of a single go routine. Websockets are not safe for Concurrent reads and writes and so the ManagedWebsocket is used to guarantee that only one go routine is reading or writing at any given time.