dbproxy
This commit is contained in:
parent
a6c1b37e0c
commit
898f915542
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue