mirror of
https://github.com/openziti/zrok.git
synced 2025-08-19 04:06:18 +02:00
more metrics infrastructure (#128)
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/michaelquigley/cf"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Source interface{}
|
||||
}
|
||||
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
cfg := &Config{}
|
||||
if err := cf.BindYaml(cfg, path, GetCfOptions()); err != nil {
|
||||
return nil, errors.Wrapf(err, "error loading config from '%v'", path)
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user