mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-05 22:53:03 +00:00
079d0bd8a9
* Refactor log * Add new log methods * Fix logger test * Change all logging code * Clean up pathObj * Rebase to latest main * Remove invoking method name after the dot
21 lines
352 B
Go
21 lines
352 B
Go
package conf
|
|
|
|
import (
|
|
"github.com/xtls/xray-core/app/metrics"
|
|
"github.com/xtls/xray-core/common/errors"
|
|
)
|
|
|
|
type MetricsConfig struct {
|
|
Tag string `json:"tag"`
|
|
}
|
|
|
|
func (c *MetricsConfig) Build() (*metrics.Config, error) {
|
|
if c.Tag == "" {
|
|
return nil, errors.New("metrics tag can't be empty.")
|
|
}
|
|
|
|
return &metrics.Config{
|
|
Tag: c.Tag,
|
|
}, nil
|
|
}
|