feat 基础模块拆分为雪花和日志模块
This commit is contained in:
@@ -14,9 +14,9 @@ import (
|
||||
// Prometheus 普罗米修斯模块
|
||||
type Prometheus struct {
|
||||
DefaultModule
|
||||
MetricCfg *config.MetricConfig
|
||||
wg *sync.WaitGroup
|
||||
server *http.Server
|
||||
Cfg *config.MetricConfig
|
||||
wg *sync.WaitGroup
|
||||
server *http.Server
|
||||
}
|
||||
|
||||
func (m *Prometheus) Init() error {
|
||||
@@ -29,7 +29,7 @@ func (m *Prometheus) Start(ready *sync.WaitGroup) error {
|
||||
go func() {
|
||||
defer m.wg.Done()
|
||||
m.server = &http.Server{
|
||||
Addr: fmt.Sprintf("%v:%v", m.MetricCfg.Prometheus.Address, m.MetricCfg.Prometheus.Port),
|
||||
Addr: fmt.Sprintf("%v:%v", m.Cfg.Prometheus.Address, m.Cfg.Prometheus.Port),
|
||||
Handler: promhttp.Handler(),
|
||||
}
|
||||
ready.Done()
|
||||
|
||||
Reference in New Issue
Block a user