From 898f915542b1f24e4806c24e55e336d481f27b28 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 23 May 2024 16:05:38 +0800 Subject: [PATCH] dbproxy --- dbproxy/config.json | 13 +++++++------ dbproxy/main.go | 4 ---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dbproxy/config.json b/dbproxy/config.json index 4860ed2..327f019 100644 --- a/dbproxy/config.json +++ b/dbproxy/config.json @@ -44,6 +44,12 @@ "AppId": "5c56d1644966f078bfb90c71", "IsDevMode": true }, + "etcd": { + "Url": ["127.0.0.1:2379"], + "UserName": "", + "Password": "", + "DialTimeout": 60 + }, "costum": { "MgoRpcCliNet": "tcp", "MgoRpcCliAddr": "127.0.0.1:8999", @@ -51,11 +57,6 @@ "RMQExchange": "win88", "RMQQosPrefetchCount": 2, "RMQQosPrefetchSize": 0, - "RMQQosGlobal": true, - "etcdurl": [ - "127.0.0.1:2379" - ], - "etcduser": "", - "etcdpwd": "" + "RMQQosGlobal": true } } \ No newline at end of file diff --git a/dbproxy/main.go b/dbproxy/main.go index 5b84967..535485b 100644 --- a/dbproxy/main.go +++ b/dbproxy/main.go @@ -5,7 +5,6 @@ import ( "net" "net/http" "net/rpc" - "time" "mongo.games.com/goserver/core" "mongo.games.com/goserver/core/module" @@ -13,7 +12,6 @@ import ( _ "mongo.games.com/game" "mongo.games.com/game/common" "mongo.games.com/game/dbproxy/svc" - "mongo.games.com/game/etcd" "mongo.games.com/game/model" "mongo.games.com/game/mq" ) @@ -26,7 +24,6 @@ func main() { core.LoadPackages("config.json") // core hook core.RegisteHook(core.HOOK_BEFORE_START, func() error { - etcd.Start(common.CustomConfig.GetStrings("etcdurl"), common.CustomConfig.GetString("etcduser"), common.CustomConfig.GetString("etcdpwd"), time.Minute) mq.StartConsumer(common.CustomConfig.GetString("RabbitMQURL"), common.CustomConfig.GetString("RMQExchange"), true) mq.StartPublisher(common.CustomConfig.GetString("RabbitMQURL"), common.CustomConfig.GetString("RMQExchange"), true, common.CustomConfig.GetInt("RMQPublishBacklog")) // 尝试初始化玩家id @@ -41,7 +38,6 @@ func main() { return nil }) core.RegisteHook(core.HOOK_AFTER_STOP, func() error { - etcd.Close() mq.StopConsumer() mq.StopPublisher() return nil