mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-23 11:53:33 +02:00
19 lines
307 B
Go
19 lines
307 B
Go
package conf
|
|
|
|
import (
|
|
"github.com/xtls/xray-core/app/metrics"
|
|
)
|
|
|
|
type MetricsConfig struct {
|
|
Tag string `json:"tag"`
|
|
}
|
|
|
|
func (c *MetricsConfig) Build() (*metrics.Config, error) {
|
|
if c.Tag == "" {
|
|
return nil, newError("metrics tag can't be empty.")
|
|
}
|
|
|
|
return &metrics.Config{
|
|
Tag: c.Tag,
|
|
}, nil
|
|
}
|