feat mysql

This commit is contained in:
2025-12-18 18:17:41 +08:00
parent da91cff056
commit 55c5d4cc18
44 changed files with 1460 additions and 338 deletions

View File

@@ -17,12 +17,12 @@ type ModulePrometheus struct {
server *http.Server
}
func (m *ModulePrometheus) Init() error {
func (m *ModulePrometheus) init() error {
m.wg = &sync.WaitGroup{}
return nil
}
func (m *ModulePrometheus) Start() error {
func (m *ModulePrometheus) start() error {
m.wg.Add(1)
go func() {
defer m.wg.Done()
@@ -38,7 +38,7 @@ func (m *ModulePrometheus) Start() error {
return nil
}
func (m *ModulePrometheus) Stop() error {
func (m *ModulePrometheus) stop() error {
if err := m.server.Shutdown(context.Background()); err != nil {
log.Errorf("stop prometheus server failed: %v", err)
}