deprecated-oc-catalog/services/init.go

31 lines
585 B
Go
Raw Normal View History

2023-03-03 14:43:11 +01:00
package services
import (
2024-07-29 18:02:29 +02:00
"cloud.o-forge.io/core/deprecated-oc-catalog/conf"
2023-03-03 14:43:11 +01:00
)
func Init() {
2023-12-04 14:46:36 +01:00
// Discoveryinit() //First init DC name
2024-02-15 10:52:29 +01:00
// var DBpoint string
// var err error
2024-02-15 10:52:29 +01:00
DCName := conf.GetConfig().DCNAME
DBPoint := conf.GetConfig().DBPOINT
2023-12-04 14:46:36 +01:00
2024-02-15 10:52:29 +01:00
// DBpoint = os.Getenv("DOCKER_DBPOINT")
2023-12-04 14:46:36 +01:00
// if len(DBpoint) == 0 {
// DBpoint, err = beego.AppConfig.String("DBPOINT")
// if err != nil {
// logs.Critical("DBPOINT URI error: %v", err)
// panic(err)
// }
2024-02-15 10:52:29 +01:00
2023-12-04 14:46:36 +01:00
// }
2023-03-03 14:43:11 +01:00
2024-02-15 10:52:29 +01:00
// Mongoinit(DC_NAME + "-" + DBpoint)
Mongoinit(DCName + "-" + DBPoint )
// Mongoinit("beego-demo")
2023-03-03 14:43:11 +01:00
}