use clusteragent to dispatch cluster request

This commit is contained in:
Cloud Wu
2018-04-14 16:11:26 +08:00
committed by 云风
parent 1932d33b41
commit 7304a990cb
4 changed files with 138 additions and 70 deletions

View File

@@ -8,7 +8,7 @@ skynet.start(function()
local proxy = cluster.proxy("db", sdb)
local largekey = string.rep("X", 128*1024)
local largevalue = string.rep("R", 100 * 1024)
print(skynet.call(proxy, "lua", "SET", largekey, largevalue))
skynet.call(proxy, "lua", "SET", largekey, largevalue)
local v = skynet.call(proxy, "lua", "GET", largekey)
assert(largevalue == v)
skynet.send(proxy, "lua", "PING", "proxy")