github.com/xraypb/Xray-core@v1.8.1/infra/conf/metrics.go (about) 1 package conf 2 3 import ( 4 "github.com/xraypb/Xray-core/app/metrics" 5 ) 6 7 type MetricsConfig struct { 8 Tag string `json:"tag"` 9 } 10 11 func (c *MetricsConfig) Build() (*metrics.Config, error) { 12 if c.Tag == "" { 13 return nil, newError("metrics tag can't be empty.") 14 } 15 16 return &metrics.Config{ 17 Tag: c.Tag, 18 }, nil 19 }