From fbb2268bcf53f718623830eefa83ec505cae02c1 Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Fri, 27 Oct 2023 18:02:12 +0800 Subject: [PATCH] modify the field of meta.node and meta.edge --- server/meta/edge.go | 16 ++++++++++------ server/meta/node.go | 12 +++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/server/meta/edge.go b/server/meta/edge.go index 6d84c95..e516aad 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 d109525..874b669 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) { -- Gitee