Przeglądaj źródła

fix: health does not report infinite array of strings, add build files to gitignore

master
Blaz Smehov 16 godzin temu
rodzic
commit
c917ace01e
7 zmienionych plików z 13 dodań i 6 usunięć
  1. +5
    -0
      .gitignore
  2. BIN
      bridge
  3. BIN
      decoder
  4. +2
    -1
      internal/pkg/common/appcontext/health.go
  5. +6
    -5
      internal/pkg/model/alerts.go
  6. BIN
      location
  7. BIN
      server

+ 5
- 0
.gitignore Wyświetl plik

@@ -26,6 +26,11 @@ vendor/
volumes/node-red/
main

bridge
decoder
server
location

**/*.log

ROADMAP.md

BIN
bridge Wyświetl plik


BIN
decoder Wyświetl plik


+ 2
- 1
internal/pkg/common/appcontext/health.go Wyświetl plik

@@ -9,7 +9,7 @@ import (

// ServiceStatus represents the health of an external service (e.g. Kafka, database).
type ServiceStatus struct {
Status string `json:"status"` // "up", "down", "unknown"
Status string `json:"status"` // "up", "down", "unknown"
Message string `json:"message,omitempty"`
}

@@ -56,6 +56,7 @@ func (b *BaseHealth) GetActiveWriters(m *kafkaclient.KafkaManager) {

func (b *BaseHealth) GetActiveBeacons(m *AppState) {
beacons := m.GetAllBeacons()
b.ActiveBeacons = []string{}
for beacon := range beacons {
b.ActiveBeacons = append(b.ActiveBeacons, beacon)
}


+ 6
- 5
internal/pkg/model/alerts.go Wyświetl plik

@@ -3,9 +3,10 @@ package model
import "time"

type Alert struct {
ID string `json:"id" gorm:"primaryKey"`
TrackerID string `json:"tracker_id"`
Type string `json:"type"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
ID string `json:"id" gorm:"primaryKey"`
TrackerID string `json:"tracker_id"`
Type string `json:"type"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
ResolutionTimestamp time.Time `json:"resolution_timestamp"`
}

BIN
location Wyświetl plik


BIN
server Wyświetl plik


Ładowanie…
Anuluj
Zapisz