save work, not yet working
This commit is contained in:
23
src/udi/handlers/iot/iot.go
Normal file
23
src/udi/handlers/iot/iot.go
Normal file
@ -0,0 +1,23 @@
|
||||
package iot
|
||||
|
||||
import "log"
|
||||
|
||||
var idSeq int = 0
|
||||
|
||||
type IoTHandler struct {
|
||||
id int
|
||||
}
|
||||
|
||||
func NewIoTHandler() *IoTHandler {
|
||||
t := &IoTHandler {
|
||||
id: idSeq,
|
||||
}
|
||||
idSeq += 1
|
||||
return t
|
||||
}
|
||||
|
||||
func (self *IoTHandler) Handle(topic, payload string) {
|
||||
log.Printf("Handler IoT %d processing %s -> %s", self.id, topic, payload)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user