节点IP可以设置阈值

This commit is contained in:
刘祥超
2021-08-18 17:09:34 +08:00
parent 928d8c3ace
commit ca85f71f2b
4 changed files with 70 additions and 25 deletions

View File

@@ -0,0 +1,13 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package nodeconfigs
type NodeIPAddr struct {
Id int64 `json:"id"`
Name string `json:"name"`
Thresholds []*NodeValueThresholdConfig `json:"thresholds"`
IP string `json:"ip"`
IsOn bool `json:"isOn"`
IsUp bool `json:"isUp"`
CanAccess bool `json:"canAccess"`
}

View File

@@ -306,3 +306,12 @@ func UnmarshalNodeValue(valueJSON []byte) string {
}
return result
}
// NodeValueThresholdConfig 阈值
type NodeValueThresholdConfig struct {
Item NodeValueItem `json:"item"`
Operator NodeValueOperator `json:"operator"`
Value int64 `json:"value"`
Duration int `json:"duration"`
DurationUnit NodeValueDurationUnit `json:"durationUnit"`
}