mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 05:30:05 +00:00
💥 v2.0 必须更新面板,新增服务监控
This commit is contained in:
22
model/monitor_history.go
Normal file
22
model/monitor_history.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
pb "github.com/naiba/nezha/proto"
|
||||
)
|
||||
|
||||
type MonitorHistory struct {
|
||||
Common
|
||||
MonitorID uint64
|
||||
Delay float32 // 延迟,毫秒
|
||||
Data string
|
||||
Successful bool // 是否成功
|
||||
}
|
||||
|
||||
func PB2MonitorHistory(r *pb.TaskResult) MonitorHistory {
|
||||
return MonitorHistory{
|
||||
Delay: r.GetDelay(),
|
||||
Successful: r.GetSuccessful(),
|
||||
MonitorID: r.GetId(),
|
||||
Data: r.GetData(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user