Просмотр исходного кода

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

master
Blaz Smehov 20 часов назад
Родитель
Сommit
c917ace01e
7 измененных файлов: 13 добавлений и 6 удалений
  1. +5
    -0
      .gitignore
  2. Двоичные данные
      bridge
  3. Двоичные данные
      decoder
  4. +2
    -1
      internal/pkg/common/appcontext/health.go
  5. +6
    -5
      internal/pkg/model/alerts.go
  6. Двоичные данные
      location
  7. Двоичные данные
      server

+ 5
- 0
.gitignore Просмотреть файл

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


bridge
decoder
server
location

**/*.log **/*.log


ROADMAP.md ROADMAP.md

Двоичные данные
bridge Просмотреть файл


Двоичные данные
decoder Просмотреть файл


+ 2
- 1
internal/pkg/common/appcontext/health.go Просмотреть файл

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


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


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


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


+ 6
- 5
internal/pkg/model/alerts.go Просмотреть файл

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


type Alert struct { 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"`
} }

Двоичные данные
location Просмотреть файл


Двоичные данные
server Просмотреть файл


Загрузка…
Отмена
Сохранить