Files
universal-data-ingest/src/udi/handlers/iot/iot.go
Wolfgang Hottgenroth a5209dad8f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix configuration
2023-12-05 16:21:30 +01:00

30 lines
470 B
Go

package iot
import "log"
import "fmt"
import "udi/handlers/handler"
var idSeq int = 0
type IoTHandler struct {
id int
}
func NewIoTHandler() handler.Handler {
t := &IoTHandler {
id: idSeq,
}
idSeq += 1
return t
}
func (self *IoTHandler) GetId() string {
return fmt.Sprintf("IoT%d", self.id)
}
func (self *IoTHandler) Handle(message handler.MessageT) {
log.Printf("Handler IoT %d processing %s -> %s", self.id, message.Topic, message.Payload)
}