Skip to content

Commit 93d6574

Browse files
author
Cairry
committed
🚀 Optimized service topology data model
1 parent 62b717c commit 93d6574

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

internal/models/topology.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ type Node struct {
4646
}
4747

4848
type NodeData struct {
49-
Label string `json:"label"`
50-
SubLabel string `json:"subLabel"`
51-
Type string `json:"type"`
52-
EnablePrometheus bool `json:"enablePrometheus"`
53-
MetricsLabel string `json:"metricsLabel"`
54-
PrometheusQuery string `json:"prometheusQuery"`
55-
Operator string `json:"operator"`
56-
Threshold string `json:"threshold"`
57-
DatasourceId string `json:"datasourceId"`
49+
Label string `json:"label"`
50+
SubLabel string `json:"subLabel"`
51+
Type string `json:"type"`
52+
DatasourceId string `json:"datasourceId"`
53+
NodeMetrics []NodeMetrics `json:"metrics"`
54+
}
55+
56+
type NodeMetrics struct {
57+
ID string `json:"id"`
58+
Query string `json:"query"`
59+
Tag string `json:"tag"`
5860
}
5961

6062
type Position struct {

0 commit comments

Comments
 (0)