This commit is contained in:
2025-06-29 10:39:00 +08:00
parent 605197345b
commit b45eb83fe4
15 changed files with 597 additions and 3 deletions

20
Server/scene/app/db.go Normal file
View File

@@ -0,0 +1,20 @@
package app
import (
"common/db/etcd"
"scene/config"
)
func (p *Program) initDB(cfg *config.Config) error {
// ETCD
if err := etcd.Init(cfg.DB.Etcd.Address); err != nil {
return err
}
return nil
}
func (p *Program) stopDB() error {
_ = etcd.Close()
return nil
}