소스 검색

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) incoming = mqttclient.IncomingBeaconFilter(incoming)
id := mqttclient.GetBeaconID(incoming) id := mqttclient.GetBeaconID(incoming)
now := time.Now().Unix() 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)) 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 { func sendKafkaMessage(writer *kafka.Writer, value *model.ApiUpdate) bool {
valueStr, err := json.Marshal(&value) valueStr, err := json.Marshal(&value)
if err != nil { if err != nil {


+ 172
- 36
test/node-red-integration-tests/apitest.json
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장