1
This commit is contained in:
parent
fd8708e197
commit
43403cb8ea
@ -20,15 +20,9 @@ void JsonDataMgr::Init()
|
|||||||
App::Instance()->node_id,
|
App::Instance()->node_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
targetserver_cluster_json_file = a8::Format("../config/node%d/game%d.gameserver.cluster.json",
|
|
||||||
{
|
|
||||||
App::Instance()->node_id,
|
|
||||||
GAME_ID
|
|
||||||
});
|
|
||||||
#else
|
#else
|
||||||
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
|
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
|
||||||
masterserver_cluster_json_file = a8::Format("../config/game%d.masterserver.cluster.json", {GAME_ID});
|
masterserver_cluster_json_file = a8::Format("../config/game%d.masterserver.cluster.json", {GAME_ID});
|
||||||
targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID});
|
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#ifdef MASTER_MODE
|
#ifdef MASTER_MODE
|
||||||
@ -44,12 +38,6 @@ void JsonDataMgr::Init()
|
|||||||
App::Instance()->node_id,
|
App::Instance()->node_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
targetserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/node%d/game%d.gameserver.cluster.json",
|
|
||||||
{
|
|
||||||
GAME_ID,
|
|
||||||
App::Instance()->node_id,
|
|
||||||
GAME_ID
|
|
||||||
});
|
|
||||||
#else
|
#else
|
||||||
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json",
|
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json",
|
||||||
{GAME_ID, GAME_ID});
|
{GAME_ID, GAME_ID});
|
||||||
@ -84,7 +72,10 @@ std::shared_ptr<a8::XObject> JsonDataMgr::GetMasterServerClusterConf()
|
|||||||
return std::make_shared<a8::XObject>(masterserver_cluster_json_);
|
return std::make_shared<a8::XObject>(masterserver_cluster_json_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MASTER_MODE
|
||||||
|
#else
|
||||||
std::shared_ptr<a8::XObject> JsonDataMgr::GetTargetServerClusterConf()
|
std::shared_ptr<a8::XObject> JsonDataMgr::GetTargetServerClusterConf()
|
||||||
{
|
{
|
||||||
return std::make_shared<a8::XObject>(targetserver_cluster_json_);
|
return std::make_shared<a8::XObject>(targetserver_cluster_json_);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -12,11 +12,16 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
|||||||
|
|
||||||
std::shared_ptr<a8::XObject> GetConf();
|
std::shared_ptr<a8::XObject> GetConf();
|
||||||
std::shared_ptr<a8::XObject> GetMasterServerClusterConf();
|
std::shared_ptr<a8::XObject> GetMasterServerClusterConf();
|
||||||
|
#if MASTER_MODE
|
||||||
|
#else
|
||||||
std::shared_ptr<a8::XObject> GetTargetServerClusterConf();
|
std::shared_ptr<a8::XObject> GetTargetServerClusterConf();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
a8::XObject wsproxyserver_cluster_json_;
|
a8::XObject wsproxyserver_cluster_json_;
|
||||||
a8::XObject masterserver_cluster_json_;
|
a8::XObject masterserver_cluster_json_;
|
||||||
|
#if MASTER_MODE
|
||||||
|
#else
|
||||||
a8::XObject targetserver_cluster_json_;
|
a8::XObject targetserver_cluster_json_;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user