Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler func(topic EventName)
type EventManager ¶
type EventManager interface { On(topic EventName, handler EventHandler) RegistrationId Emit(topic EventName) Remove(idToRemove RegistrationId) }
func NewEventManager ¶
func NewEventManager() EventManager
type EventName ¶
type EventName string
const ( TOPIC_SPACE_OPEN_STATE EventName = "spaceOpen" TOPIC_RADSTELLE_OPEN_STATE EventName = "radstelleOpen" TOPIC_LAB_3D_OPEN_STATE EventName = "lab3dOpen" TOPIC_MACHINING_OPEN_STATE EventName = "machining" TOPIC_SPACE_DEVICES EventName = "spaceDevices" TOPIC_POWER_USAGE EventName = "powerUsage" TOPIC_FREIFUNK EventName = "freifunk" TOPIC_WEATHER EventName = "weather" TOPIC_MQTT EventName = "mqtt" TOPIC_KEYHOLDER EventName = "keyholder" )
type RegistrationId ¶
type RegistrationId uint
Click to show internal directories.
Click to hide internal directories.