diff --git a/server/meta/edge.go b/server/meta/edge.go index 6d84c95627f866ebd71a1b2dd5362ed3ca800a06..e516aadbbc633cdd159f71f8aca9fb21a170f120 100644 --- a/server/meta/edge.go +++ b/server/meta/edge.go @@ -16,12 +16,16 @@ type Edges struct { } type Edge struct { - ID string - Type string - Src string `json:"source"` - Dst string `json:"target"` - Dir bool - Metrics map[string]string + DBID int64 `json:"dbid"` + ID string `json:"id"` + Type string `json:"type"` + SrcID int64 `json:"sourceid"` + DstID int64 `json:"targetid"` + Src string `json:"source"` + Dst string `json:"target"` + Dir string `json:"dir"` + Unixtime string `json:"unixtime"` + Metrics map[string]string `json:"metrics"` } // 网络边镜像id检测:多个goruntine并发添加、访问、修改相同的edge实例 diff --git a/server/meta/node.go b/server/meta/node.go index d109525010e4d30335f55485f458633b2dce51f0..874b669aee3b0fd885c523aab300d82f16551b83 100755 --- a/server/meta/node.go +++ b/server/meta/node.go @@ -16,11 +16,13 @@ type Nodes struct { } type Node struct { - ID string `json:"id"` // uuid-type-basicinfo - Name string `json:"name"` - Type string `json:"type"` - UUID string `json:"uuid"` - Metrics map[string]string `json:"metrics"` + DBID int64 `json:"dbid"` + ID string `json:"id"` // uuid-type-basicinfo + Name string `json:"name"` + Type string `json:"type"` + UUID string `json:"uuid"` + Unixtime string `json:"unixtime"` + Metrics map[string]string `json:"metrics"` } func (ns *Nodes) Add(node *Node) {