-
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 #21 from pwnsky/dev
Dev
- Loading branch information
Showing
464 changed files
with
103,741 additions
and
7,755 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,14 +1,14 @@ | ||
<XML> | ||
<DbProxy> | ||
<DbProxy> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/kernel" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/redis" /> | ||
|
||
<Plugin Name="node/db_proxy/node" /> | ||
<Plugin Name="node/db_proxy/logic" /> | ||
<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> | ||
</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,11 @@ | ||
<XML> | ||
<GameServer> | ||
<Lobby> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/kernel" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/lua" /> | ||
|
||
<Plugin Name="node/lobby/node" /> | ||
</GameServer> | ||
</Lobby> | ||
</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,9 +1,9 @@ | ||
<XML> | ||
<GameServer> | ||
<Test> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/kernel" /> | ||
<Plugin Name="core/nosql" /> | ||
<Plugin Name="core/config" /> | ||
</GameServer> | ||
</Test> | ||
</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
Binary file not shown.
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
File renamed without changes.
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 @@ | ||
----------------------------------------------------------------------------- | ||
-- Author: i0gan | ||
-- Email : [email protected] | ||
-- Date : 2023-09-24 | ||
-- Description: db init | ||
----------------------------------------------------------------------------- | ||
require "lib.db.redis" | ||
require "lib.db.mysql" | ||
require "lib.db.mongo" | ||
require "lib.db.clickhouse" |
File renamed without changes.
Empty file.
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,46 @@ | ||
----------------------------------------------------------------------------- | ||
-- Author: i0gan | ||
-- Email : [email protected] | ||
-- Date : 2023-09-24 | ||
-- Github: https://github.com/pwnsky/squick | ||
-- Description: async redis cli | ||
----------------------------------------------------------------------------- | ||
|
||
RedisServerID = 300; | ||
|
||
Redis = { | ||
query_id = 0; | ||
co = {} | ||
} | ||
|
||
function Blank() | ||
|
||
end | ||
|
||
function Redis:Bind() | ||
Net:ClientRegister(ServerType.ST_DB_PROXY, DbProxyRPC.ACK_REDIS_GET, self, self.AckGet) | ||
end | ||
|
||
function Redis:Get(co, key) | ||
local req = { | ||
query_id = self.query_id, | ||
key = key, | ||
} | ||
self.co[self.query_id] = co; | ||
Net:SendToServer(RedisServerID, DbProxyRPC.REQ_REDIS_GET, Squick:Encode("rpc.ReqRedisGet", req), "lobby") | ||
local result = coroutine.yield() | ||
self.query_id = self.query_id + 1 % 1000000; | ||
return result.value | ||
end | ||
|
||
function Redis:AckGet(guid, msg_data, msg_id, fd) | ||
local data = Squick:Decode("rpc.AckRedisGet", msg_data); | ||
local co = self.co[data.query_id] | ||
coroutine.resume(co, data) | ||
end | ||
|
||
function Redis:Set() | ||
|
||
end | ||
|
||
Redis:Bind(); |
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 @@ | ||
----------------------------------------------------------------------------- | ||
-- Author: i0gan | ||
-- Email : [email protected] | ||
-- Date : 2023-09-24 | ||
-- Description: lib init | ||
----------------------------------------------------------------------------- | ||
require "lib.db.init" |
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
Oops, something went wrong.