From c3bdacbf3d5c2aa6b6bf36d8b24ac8e337b98f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 14 Sep 2021 19:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/nodeconfigs/node_value_thresholds.go | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/nodeconfigs/node_value_thresholds.go b/pkg/nodeconfigs/node_value_thresholds.go index 0268604..cd4e90e 100644 --- a/pkg/nodeconfigs/node_value_thresholds.go +++ b/pkg/nodeconfigs/node_value_thresholds.go @@ -88,24 +88,24 @@ func FindAllIPAddressThresholdItems() []maps.Map { } } -// NodeValueThresholdConfig 阈值列表 -type NodeValueThresholdConfig struct { +// IPAddressThresholdConfig 阈值列表 +type IPAddressThresholdConfig struct { Id int64 `json:"id"` - Items []*NodeValueThresholdItemConfig `json:"items"` - Actions []*NodeValueThresholdActionConfig `json:"actions"` + Items []*IPAddressThresholdItemConfig `json:"items"` + Actions []*IPAddressThresholdActionConfig `json:"actions"` } -// NodeValueThresholdItemConfig 阈值项目 -type NodeValueThresholdItemConfig struct { - Item NodeValueItem `json:"item"` - Operator NodeValueOperator `json:"operator"` - Value float64 `json:"value"` - Duration int `json:"duration"` - DurationUnit NodeValueDurationUnit `json:"durationUnit"` - Options maps.Map `json:"options"` // 附加选项 +// IPAddressThresholdItemConfig 阈值项目 +type IPAddressThresholdItemConfig struct { + Item IPAddressThresholdItem `json:"item"` + Operator NodeValueOperator `json:"operator"` + Value float64 `json:"value"` + Duration int `json:"duration"` + DurationUnit NodeValueDurationUnit `json:"durationUnit"` + Options maps.Map `json:"options"` // 附加选项 } -type NodeValueThresholdActionConfig struct { +type IPAddressThresholdActionConfig struct { Action string `json:"action"` Options maps.Map `json:"options"` }