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