Преглед на файлове

chore: update node-red test with MQTT messages

chore/proposed-structure
Blaz Smehov преди 4 седмици
родител
ревизия
dc0bb7c777
променени са 3 файла, в които са добавени 174 реда и са изтрити 38 реда
  1. +2
    -0
      cmd/decoder/main.go
  2. +0
    -2
      cmd/server/main.go
  3. +172
    -36
      test/node-red-integration-tests/apitest.json

+ 2
- 0
cmd/decoder/main.go Целия файл

@@ -146,6 +146,8 @@ func processIncoming(incoming model.Incoming_json, ctx *model.AppContext) {
}
}()

fmt.Println("message came")

incoming = mqttclient.IncomingBeaconFilter(incoming)
id := mqttclient.GetBeaconID(incoming)
now := time.Now().Unix()


+ 0
- 2
cmd/server/main.go Целия файл

@@ -50,8 +50,6 @@ func HttpServer(addr string) {
http.ListenAndServe(addr, handlers.CORS(originsOk, headersOk, methodsOk)(r))
}

// This looks wrong, should handle error somehow

func sendKafkaMessage(writer *kafka.Writer, value *model.ApiUpdate) bool {
valueStr, err := json.Marshal(&value)
if err != nil {


+ 172
- 36
test/node-red-integration-tests/apitest.json
Файловите разлики са ограничени, защото са твърде много
Целия файл


Зареждане…
Отказ
Запис