save work, not yet working

This commit is contained in:
2023-11-28 16:53:51 +01:00
parent 3094cf9cd4
commit 8ba312d585
6 changed files with 95 additions and 16 deletions

View 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)
}