forked from ifzz/zServer
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb9864c
commit 0eca658
Showing
30 changed files
with
847 additions
and
118 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
app_root = "$ROOT/" | ||
skynet_root = "$SKYNET_ROOT/" | ||
|
||
logpath = app_root.."run/" | ||
|
||
thread = 4 | ||
harbor = 0 | ||
start = "main" | ||
bootstrap = "snlua bootstrap" | ||
|
||
runconfig = "runconfig" | ||
|
||
nodename = "node2" | ||
|
||
--logger = "logd" | ||
--logservice = "snlua" | ||
--logfilename = "logtest" | ||
--logfilemaxline = 2 | ||
|
||
|
||
|
||
luaservice = skynet_root.."service/?.lua;"..app_root.."service/?.lua;" | ||
lualoader = skynet_root.."lualib/loader.lua" | ||
|
||
lua_path = skynet_root.."lualib/?.lua;"..skynet_root.."lualib/compat10/?.lua;"..skynet_root.."lualib/?/init.lua;"..app_root.."etc/?.lua;"..app_root.."lualib/?.lua;"..app_root.."config/?.lua;" | ||
|
||
lua_cpath = skynet_root.."luaclib/?.so;"..app_root.."luaclib/?.so" | ||
cpath = skynet_root.."cservice/?.so;"..app_root.."cservice/?.so" | ||
|
||
|
||
if $DAEMON then | ||
daemon = app_root.."run/skynet.pid" | ||
end | ||
|
||
|
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,32 +1,54 @@ | ||
return { | ||
TEST = true, | ||
version = "1.0.0", | ||
|
||
node1 = { | ||
-- 当前节点控制台监听端口 | ||
debug_console_port = 8701, | ||
-- agent 池配置 | ||
agentpool = { | ||
name = "agent", -- 要启动缓存的 agent 文件名 | ||
maxmun = 2, -- 池的最大容量 | ||
recyremove = 0, -- 如果池的最大容量都用完之后, 后续扩展的容量在回收时是否删除,0:不删除 1:删除 | ||
}, | ||
|
||
db = { | ||
db_type = "mongodb", | ||
host = "127.0.0.1", | ||
db_name = "test", | ||
}, | ||
|
||
|
||
centerd_num = 2, | ||
dbproxy_num = 2, | ||
login_num = 2, | ||
|
||
watchdog = { | ||
port = 8799, | ||
maxclient = 1024, | ||
nodelay = true, | ||
} | ||
|
||
--集群地址配置 | ||
cluster = { | ||
node1 = "127.0.0.1:2528", | ||
node2 = "127.0.0.1:2529", | ||
}, | ||
|
||
--各个服务配置 | ||
service = { | ||
--debug_console服务 | ||
--每个节点都需要配置一个 | ||
debug_console = { | ||
[1] = {port=8701, node = "node1"}, | ||
[2] = {port=8702, node = "node2"}, | ||
}, | ||
|
||
--watchdog服务 | ||
--每个节点都需要配置一个 | ||
watchdog_common = {maxclient = 1024, nodelay = true}, | ||
watchdog = { | ||
[1] = {port = 8798, node = "node2"}, | ||
[2] = {port = 8799, node = "node1"}, | ||
}, | ||
--center服务 | ||
center = { | ||
[1] = {node = "node1"}, | ||
[2] = {node = "node1"}, | ||
}, | ||
--login服务 | ||
login = { | ||
[1] = {node = "node1"}, | ||
[2] = {node = "node1"}, | ||
}, | ||
--dbproxy服务 | ||
dbproxy_common = {db_type = "mongodb",host = "127.0.0.1",db_name = "test"}, | ||
dbproxy = { | ||
[1] = {node = "node1"}, | ||
[2] = {node = "node1"}, | ||
}, | ||
--agentpool服务 | ||
--每个有agent的节点需要开启 | ||
--agentpool_common.name 要启动缓存的 agent 文件名 | ||
--agentpool_common.maxmun 池的最大容量 | ||
--agentpool_common.recyremove 如果池的最大容量都用完之后, 后续扩展的容量在回收时是否删除,0:不删除 1:删除 | ||
agentpool_common = {name = "wsagent", maxnum = 10, recyremove = 2, brokecachelen=10}, | ||
agentpool = { | ||
[1] = {node = "node2"}, | ||
[2] = {node = "node1"}, | ||
}, | ||
}, | ||
} |
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
Oops, something went wrong.