add metrics http exporter
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -3,11 +3,17 @@ package config
|
||||
import (
|
||||
"io"
|
||||
|
||||
yamlcodec "go.unistack.org/micro-codec-yaml/v3"
|
||||
mtime "go.unistack.org/micro/v3/util/time"
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type Meter struct {
|
||||
Addr string `json:"addr,omitempty" yaml:"addr,omitempty"`
|
||||
Path string `json:"path,omitempty" yaml:"path,omitempty"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Meter *Meter `json:"meter,omitempty" yaml:"meter,omitempty"`
|
||||
Checks []*Check `json:"checks,omitempty" yaml:"checks,omitempty"`
|
||||
}
|
||||
|
||||
@@ -35,5 +41,5 @@ func (cfg *Config) Parse(r io.Reader) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return yaml.Unmarshal(buf, cfg)
|
||||
return yamlcodec.NewCodec().Unmarshal(buf, cfg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user