mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
add service manager
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local skynet = require "skynet"
|
||||
|
||||
local SERVICE = "GROUPMGR"
|
||||
local SERVICE
|
||||
|
||||
local group = {}
|
||||
|
||||
@@ -27,4 +27,9 @@ function group.release(id)
|
||||
skynet.send(SERVICE, "lua" , "CLEAR", skynet.self(), id)
|
||||
end
|
||||
|
||||
skynet.init(function()
|
||||
SERVICE = skynet.call("SERVICE", "lua", "group_mgr")
|
||||
skynet.call(".service","lua","group_agent")
|
||||
end, "group")
|
||||
|
||||
return group
|
||||
Reference in New Issue
Block a user