fix(ops): 修复Go代码格式问题

This commit is contained in:
IanShaw027
2026-01-12 14:36:32 +08:00
parent 89c1a41305
commit e0cccf6ed2
3 changed files with 4 additions and 6 deletions

View File

@@ -192,4 +192,3 @@ func (h *OpsHandler) UpdateMetricThresholds(c *gin.Context) {
}
response.Success(c, updated)
}

View File

@@ -553,4 +553,3 @@ func (s *OpsService) UpdateMetricThresholds(ctx context.Context, cfg *OpsMetricT
_ = json.Unmarshal(raw, updated)
return updated, nil
}

View File

@@ -62,10 +62,10 @@ type OpsAlertSilencingSettings struct {
}
type OpsMetricThresholds struct {
SLAPercentMin *float64 `json:"sla_percent_min,omitempty"` // SLA低于此值变红
LatencyP99MsMax *float64 `json:"latency_p99_ms_max,omitempty"` // 延迟P99高于此值变红
TTFTp99MsMax *float64 `json:"ttft_p99_ms_max,omitempty"` // TTFT P99高于此值变红
RequestErrorRatePercentMax *float64 `json:"request_error_rate_percent_max,omitempty"` // 请求错误率高于此值变红
SLAPercentMin *float64 `json:"sla_percent_min,omitempty"` // SLA低于此值变红
LatencyP99MsMax *float64 `json:"latency_p99_ms_max,omitempty"` // 延迟P99高于此值变红
TTFTp99MsMax *float64 `json:"ttft_p99_ms_max,omitempty"` // TTFT P99高于此值变红
RequestErrorRatePercentMax *float64 `json:"request_error_rate_percent_max,omitempty"` // 请求错误率高于此值变红
UpstreamErrorRatePercentMax *float64 `json:"upstream_error_rate_percent_max,omitempty"` // 上游错误率高于此值变红
}