-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from pwnsky/dev
Dev
- Loading branch information
Showing
167 changed files
with
1,195 additions
and
2,021 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<XML> | ||
<DbProxy> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="node/db_proxy/node" /> | ||
<Plugin Name="node/db_proxy/mysql" /> | ||
<Plugin Name="node/db_proxy/mongo" /> | ||
<Plugin Name="node/db_proxy/redis" /> | ||
<Plugin Name="node/db_proxy/clickhouse" /> | ||
<DbProxy> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/db_proxy/mysql" /> | ||
<Plugin Name="node/db_proxy/mongo" /> | ||
<Plugin Name="node/db_proxy/redis" /> | ||
<Plugin Name="node/db_proxy/clickhouse" /> | ||
<Plugin Name="node/db_proxy/logic" /> | ||
</DbProxy> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<XML> | ||
<GameMgr> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
|
||
<Plugin Name="node/ds_mgr/node" /> | ||
<Plugin Name="node/ds_mgr/logic" /> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/ds_mgr/logic" /> | ||
</GameMgr> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<XML> | ||
<Game> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
|
||
<Plugin Name="node/game/node" /> | ||
<Game> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/game/logic" /> | ||
</Game> | ||
</Game> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
<XML> | ||
<Master> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
|
||
<Plugin Name="node/master/logic" /> | ||
<Plugin Name="node/master/node" /> | ||
<Plugin Name="node/master/http" /> | ||
|
||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/master/logic" /> | ||
</Master> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<XML> | ||
<Player> | ||
<!-- The order is priority for destroy --> | ||
<Plugin Name="core/log"/> | ||
<Plugin Name="core/net"/> | ||
<Plugin Name="core/config"/> | ||
<Plugin Name="core/world" /> | ||
<Plugin Name="core/utils" /> | ||
<Plugin Name="core/thread" /> | ||
<Plugin Name="core/lua" /> | ||
|
||
<Plugin Name="node/player/node" /> | ||
</Player> | ||
<Player> | ||
<!-- The order is priority for destroy --> | ||
<Plugin Name="core/log"/> | ||
<Plugin Name="core/net"/> | ||
<Plugin Name="core/config"/> | ||
<Plugin Name="core/world" /> | ||
<Plugin Name="core/utils" /> | ||
<Plugin Name="core/thread" /> | ||
<Plugin Name="core/lua" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/player/logic" /> | ||
</Player> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<XML> | ||
<Tester> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/log" /> | ||
|
||
<Plugin Name="sqkcli/core" /> | ||
</Tester> | ||
<Tester> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="sqkcli/core" /> | ||
</Tester> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<XML> | ||
<Tutorial> | ||
<Plugin Name="tutorial/t1_plugin" /> | ||
</Tutorial> | ||
<Tutorial> | ||
<Plugin Name="tutorial/t1_plugin" /> | ||
</Tutorial> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<XML> | ||
<Tutorial> | ||
<Plugin Name="tutorial/t1_Property" /> | ||
</Tutorial> | ||
<Tutorial> | ||
<Plugin Name="tutorial/t1_Property" /> | ||
</Tutorial> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<XML> | ||
<Login> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
|
||
<Plugin Name="node/web/node" /> | ||
<Plugin Name="node/web/logic" /> | ||
</Login> | ||
|
||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/web/logic" /> | ||
</Login> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<XML> | ||
<World> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<World> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/world" /> | ||
<Plugin Name="core/world" /> | ||
<Plugin Name="core/utils" /> | ||
<Plugin Name="core/thread" /> | ||
<Plugin Name="core/lua" /> | ||
|
||
<Plugin Name="node/world/node" /> | ||
<Plugin Name="node/world/logic" /> | ||
</World> | ||
<Plugin Name="core/lua" /> | ||
<Plugin Name="core/node" /> | ||
<Plugin Name="node/world/logic" /> | ||
</World> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +0,0 @@ | ||
ServerType = | ||
{ | ||
ST_NONE = 0, | ||
ST_MASTER = 1, | ||
ST_LOGIN = 2, | ||
ST_WORLD = 3, | ||
ST_DB_PROXY = 4, | ||
ST_PROXY = 5, | ||
ST_PLAYER = 6, | ||
ST_GAME_MGR = 7, | ||
ST_GAME = 8, | ||
ST_MICRO = 9, | ||
ST_CDN = 10, | ||
ST_ROBOT = 11, | ||
ST_MAX = 12, | ||
}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
add_subdirectory(node) | ||
add_subdirectory(mysql) | ||
add_subdirectory(mongo) | ||
add_subdirectory(redis) | ||
add_subdirectory(clickhouse) | ||
add_subdirectory(clickhouse) | ||
add_subdirectory(logic) |
4 changes: 2 additions & 2 deletions
4
src/node/db_proxy/node/CMakeLists.txt → src/node/db_proxy/logic/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
set(ProjectName "db_proxy_node") | ||
set(ProjectName "db_proxy_logic") | ||
file(GLOB soruces *.cc) | ||
file(GLOB headers *.h) | ||
add_library(${ProjectName} SHARED ${soruces} ${headers}) | ||
LinkSquick(${ProjectName}) | ||
SquickOut(${ProjectName} "node/db_proxy" ${SQUICK_BUILD_PLUGIN_SERVER_PATH}/db_proxy "node") | ||
SquickOut(${ProjectName} "node/db_proxy" ${SQUICK_BUILD_PLUGIN_SERVER_PATH}/db_proxy "logic") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <squick/core/i_module.h> | ||
namespace db_proxy::logic { | ||
class ILogicModule : public IModule {}; | ||
|
||
} // namespace db_proxy::logic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "logic_module.h" | ||
|
||
namespace db_proxy::logic { | ||
bool LogicModule::Start() { | ||
m_node_ = pm_->FindModule<INodeModule>(); | ||
vector<int> node_types = {}; | ||
m_node_->AddSubscribeNode(node_types); | ||
return true; | ||
} | ||
} // namespace db_proxy::logic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
#include "i_logic_module.h" | ||
#include <squick/plugin/net/export.h> | ||
#include <squick/plugin/node/export.h> | ||
|
||
namespace db_proxy::logic { | ||
class LogicModule : public ILogicModule { | ||
public: | ||
LogicModule(IPluginManager *p) { | ||
pm_ = p; | ||
is_update_ = true; // Update | ||
} | ||
virtual bool Start() override; | ||
|
||
private: | ||
INodeModule *m_node_; | ||
}; | ||
|
||
} // namespace db_proxy::logic |
Oops, something went wrong.