Documentation ¶
Index ¶
- type Handler
- type Listener
- type Server
- func (s *Server) AddListener(group string, connection *websocket.Conn, messageTypes []string, ...) (*Listener, error)
- func (s *Server) Forward(id int64, event api.Event)
- func (s *Server) Send(group, eventType string, eventMessage interface{}) error
- func (s *Server) SendLifecycle(group, action, source string, context map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { }
Handler describes an event handler.
func NewEventHandler ¶
func NewEventHandler() *Handler
NewEventHandler creates and returns a new event handler.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener describes an event listener.
func (*Listener) Connection ¶
Connection returns the underlying websocket connection.
func (*Listener) Deactivate ¶
func (e *Listener) Deactivate()
Deactivate deactivates the event listener.
func (*Listener) MessageTypes ¶
MessageTypes returns a list of message types the listener will be notified of.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an instance of an event server.
var LoggingServer *Server
LoggingServer controls what server to use for messages coming from the logger.
func (*Server) AddListener ¶
func (s *Server) AddListener(group string, connection *websocket.Conn, messageTypes []string, location string, noForward bool) (*Listener, error)
AddListener creates and returns a new event listener.
func (*Server) Forward ¶
Forward to the local events dispatcher an event received from another node.
Click to show internal directories.
Click to hide internal directories.