ソースを参照

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

master
Blaz Smehov 2日前
コミット
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/
main

bridge
decoder
server
location

**/*.log

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).
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 ファイルの表示

@@ -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"`
}

バイナリ
location ファイルの表示


バイナリ
server ファイルの表示


読み込み中…
キャンセル
保存