diff --git a/HISTORY.md b/HISTORY.md index cb29fd78..7d140bd0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,7 +8,7 @@ Dev version * snax service add change SERVICE_PATH and add it to package.path * skynet.redirect support string address * add skynet.harbor.queryname to query globalname -* add cluster.proxy and cluster.ncall +* add cluster.proxy v0.5.2 (2014-8-11) ----------- diff --git a/examples/cluster2.lua b/examples/cluster2.lua index d45605f8..a49aa718 100644 --- a/examples/cluster2.lua +++ b/examples/cluster2.lua @@ -4,6 +4,5 @@ local cluster = require "cluster" skynet.start(function() local proxy = cluster.proxy("db", ".simpledb") print(skynet.call(proxy, "lua", "GET", "a")) - print(cluster.ncall("db.simpledb","GET", "a")) print(cluster.call("db", ".simpledb", "GET", "a")) end) diff --git a/lualib/cluster.lua b/lualib/cluster.lua index ec3f6abf..ddb00d13 100644 --- a/lualib/cluster.lua +++ b/lualib/cluster.lua @@ -24,19 +24,6 @@ function cluster.proxy(node, name) return skynet.call(clusterd, "lua", "proxy", node, name) end -local namecache = {} - -function cluster.ncall(name, ...) - local s = namecache[name] - if not s then - local node , lname = name:match "(.-)(%..+)" - assert(node and lname) - s = cluster.proxy(node, lname) - namecache[name] = assert(s) - end - return skynet.call(s, "lua", ...) -end - skynet.init(function() clusterd = skynet.uniqueservice("clusterd") end)