19 lines
501 B
Go
19 lines
501 B
Go
|
|
package core
|
||
|
|
|
||
|
|
type Edge struct {
|
||
|
|
Id int32 `json:"id"`
|
||
|
|
Host *string `json:"host,omitempty"`
|
||
|
|
Port *uint16 `json:"port,omitempty"`
|
||
|
|
Prov *string `json:"prov,omitempty"`
|
||
|
|
City *string `json:"city,omitempty"`
|
||
|
|
Isp *string `json:"isp,omitempty"`
|
||
|
|
Status *int `json:"status,omitempty"`
|
||
|
|
Rtt *int `json:"rtt,omitempty"` // 节点响应时间,单位毫秒
|
||
|
|
Loss *int `json:"loss,omitempty"` // 节点丢包率,单位百分比
|
||
|
|
}
|
||
|
|
|
||
|
|
var (
|
||
|
|
EdgeOffline = 0
|
||
|
|
EdgeOnline = 1
|
||
|
|
)
|