yuluo-yx commented on code in PR #19:
URL: 
https://github.com/apache/hertzbeat-collector-go/pull/19#discussion_r2384212976


##########
internal/collector/common/types/job/metrics_types.go:
##########
@@ -17,29 +17,37 @@
 
 package job
 
-import "time"
+import (
+       "fmt"
+       "time"
+)
 
 // Metrics represents a metric configuration
 type Metrics struct {
        Name        string            `json:"name"`
+       I18n        interface{}       `json:"i18n,omitempty"` // 
Internationalization info
        Priority    int               `json:"priority"`
+       CollectTime int64             `json:"collectTime"`
+       Interval    int64             `json:"interval"`
+       Visible     *bool             `json:"visible"`
        Fields      []Field           `json:"fields"`
        Aliasfields []string          `json:"aliasfields"`
-       Calculates  []Calculate       `json:"calculates"`
-       Units       []Unit            `json:"units"`
+       AliasFields []string          `json:"aliasFields"` // Alternative field 
name
+       Calculates  interface{}       `json:"calculates"`  // Can be 
[]Calculate or []string

Review Comment:
   用 any 而不是 interface



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to