default metric host (#196)
Co-authored-by: zhoushuguang <zhoushuguang@xiaoheiban.cn>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package prometheus
|
package prometheus
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Host string `json:",optional"`
|
Host string `json:",default=127.0.0.1"`
|
||||||
Port int `json:",default=9101"`
|
Port int `json:",default=9101"`
|
||||||
Path string `json:",default=/metrics"`
|
Path string `json:",default=/metrics"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ const (
|
|||||||
type ServiceConf struct {
|
type ServiceConf struct {
|
||||||
Name string
|
Name string
|
||||||
Log logx.LogConf
|
Log logx.LogConf
|
||||||
Mode string `json:",default=pro,options=dev|test|pre|pro"`
|
Mode string `json:",default=pro,options=dev|test|pre|pro"`
|
||||||
MetricsUrl string `json:",optional"`
|
MetricsUrl string `json:",optional"`
|
||||||
Prometheus prometheus.Config `json:",optional"`
|
Prometheus prometheus.Config
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sc ServiceConf) MustSetUp() {
|
func (sc ServiceConf) MustSetUp() {
|
||||||
|
|||||||
Reference in New Issue
Block a user