Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventMessage ¶
func NewEventMessage ¶
func NewEventMessage(et EventType, areaID uint64) *EventMessage
func (*EventMessage) GetAttr ¶
func (e *EventMessage) GetAttr() *entity.Attribute
func (*EventMessage) GetDeviceID ¶
func (e *EventMessage) GetDeviceID() int
func (*EventMessage) SetAttr ¶
func (e *EventMessage) SetAttr(attr entity.Attribute)
func (*EventMessage) SetDeviceID ¶
func (e *EventMessage) SetDeviceID(deviceID int)
type HandleFunc ¶
type HandleFunc func(em EventMessage) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Notify ¶
func (s *Server) Notify(em *EventMessage)
func (*Server) RegisterHandler ¶
func (s *Server) RegisterHandler(eventType EventType, handlerFunctions ...HandleFunc)
Click to show internal directories.
Click to hide internal directories.