mirror of https://github.com/XTLS/Xray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
307 B
20 lines
307 B
3 years ago
|
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
|
||
|
}
|