feat加入redis工具包
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"ems.agt/lib/core/redis"
|
||||
"ems.agt/lib/dborm"
|
||||
"ems.agt/lib/global"
|
||||
"ems.agt/lib/log"
|
||||
@@ -133,6 +134,7 @@ func main() {
|
||||
fmt.Printf("OMC restagent version: %s\n", global.Version)
|
||||
log.Infof("========================= OMC restagent startup =========================")
|
||||
log.Infof("OMC restagent version: %s %s %s", global.Version, global.BuildTime, global.GoVer)
|
||||
|
||||
err := dborm.InitDbClient(conf.Database.Type, conf.Database.User, conf.Database.Password,
|
||||
conf.Database.Host, conf.Database.Port, conf.Database.Name)
|
||||
if err != nil {
|
||||
@@ -164,6 +166,9 @@ func main() {
|
||||
os.Exit(4)
|
||||
}
|
||||
|
||||
// 连接redis
|
||||
redis.Connect()
|
||||
|
||||
router := routes.NewRouter()
|
||||
|
||||
// 开启监控采集
|
||||
|
||||
Reference in New Issue
Block a user