support @name, see #823

This commit is contained in:
Cloud Wu
2018-04-19 14:54:25 +08:00
committed by 云风
parent f4d5bc7aa4
commit 182d7c7dc7
4 changed files with 47 additions and 17 deletions

View File

@@ -149,6 +149,12 @@ end
local proxy = {}
function command.proxy(source, node, name)
if name == nil then
node, name = node:match "^([^@.]+)([@.].+)"
if name == nil then
error ("Invalid name " .. tostring(node))
end
end
local fullname = node .. "." .. name
if proxy[fullname] == nil then
proxy[fullname] = skynet.newservice("clusterproxy", node, name)