diff --git a/dialtesting/http.go b/dialtesting/http.go index 9f8dedcd..15ad2227 100644 --- a/dialtesting/http.go +++ b/dialtesting/http.go @@ -41,7 +41,8 @@ type HTTPTask struct { Tags map[string]string `json:"tags,omitempty"` Labels []string `json:"labels,omitempty"` WorkspaceLanguage string `json:"workspace_language,omitempty"` - TagsInfo string `json:"tags_info,omitempty"` + TagsInfo string `json:"tags_info,omitempty"` // deprecated + DFLabel string `json:"df_label,omitempty"` AdvanceOptions *HTTPAdvanceOption `json:"advance_options,omitempty"` UpdateTime int64 `json:"update_time,omitempty"` Option map[string]string @@ -658,6 +659,9 @@ func (t *HTTPTask) GetWorkspaceLanguage() string { return "zh" } -func (t *HTTPTask) GetTagsInfo() string { +func (t *HTTPTask) GetDFLabel() string { + if t.DFLabel != "" { + return t.DFLabel + } return t.TagsInfo } diff --git a/dialtesting/icmp.go b/dialtesting/icmp.go index 4c96eaaf..02b60e7b 100644 --- a/dialtesting/icmp.go +++ b/dialtesting/icmp.go @@ -64,7 +64,8 @@ type ICMPTask struct { Labels []string `json:"labels,omitempty"` UpdateTime int64 `json:"update_time,omitempty"` WorkspaceLanguage string `json:"workspace_language,omitempty"` - TagsInfo string `json:"tags_info,omitempty"` + TagsInfo string `json:"tags_info,omitempty"` // deprecated + DFLabel string `json:"df_label,omitempty"` packetLossPercent float64 avgRoundTripTime float64 // us @@ -506,6 +507,9 @@ func (t *ICMPTask) GetWorkspaceLanguage() string { return "zh" } -func (t *ICMPTask) GetTagsInfo() string { +func (t *ICMPTask) GetDFLabel() string { + if t.DFLabel != "" { + return t.DFLabel + } return t.TagsInfo } diff --git a/dialtesting/task.go b/dialtesting/task.go index 1ace65cc..20c43a86 100644 --- a/dialtesting/task.go +++ b/dialtesting/task.go @@ -47,7 +47,7 @@ type Task interface { GetLineData() string GetHostName() (string, error) GetWorkspaceLanguage() string - GetTagsInfo() string + GetDFLabel() string SetRegionID(string) SetAk(string) diff --git a/dialtesting/tcp.go b/dialtesting/tcp.go index 4eeb3582..8f24d03f 100644 --- a/dialtesting/tcp.go +++ b/dialtesting/tcp.go @@ -52,7 +52,8 @@ type TCPTask struct { Labels []string `json:"labels,omitempty"` UpdateTime int64 `json:"update_time,omitempty"` WorkspaceLanguage string `json:"workspace_language,omitempty"` - TagsInfo string `json:"tags_info,omitempty"` + TagsInfo string `json:"tags_info,omitempty"` // deprecated + DFLabel string `json:"df_label,omitempty"` reqCost time.Duration reqDNSCost time.Duration @@ -443,6 +444,9 @@ func (t *TCPTask) GetWorkspaceLanguage() string { return "zh" } -func (t *TCPTask) GetTagsInfo() string { +func (t *TCPTask) GetDFLabel() string { + if t.DFLabel != "" { + return t.DFLabel + } return t.TagsInfo } diff --git a/dialtesting/websocket.go b/dialtesting/websocket.go index 7b78ef1b..36c0e9d2 100644 --- a/dialtesting/websocket.go +++ b/dialtesting/websocket.go @@ -68,7 +68,8 @@ type WebsocketTask struct { Labels []string `json:"labels,omitempty"` UpdateTime int64 `json:"update_time,omitempty"` WorkspaceLanguage string `json:"workspace_language,omitempty"` - TagsInfo string `json:"tags_info,omitempty"` + TagsInfo string `json:"tags_info,omitempty"` // deprecated + DFLabel string `json:"df_label,omitempty"` reqCost time.Duration reqDNSCost time.Duration @@ -490,6 +491,9 @@ func (t *WebsocketTask) GetWorkspaceLanguage() string { return "zh" } -func (t *WebsocketTask) GetTagsInfo() string { +func (t *WebsocketTask) GetDFLabel() string { + if t.DFLabel != "" { + return t.DFLabel + } return t.TagsInfo }