mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 11:03:12 +00:00
17 lines
332 B
Lua
17 lines
332 B
Lua
local skynet = require "skynet"
|
|
local harbor = require "skynet.harbor"
|
|
|
|
local function monitor_master()
|
|
harbor.linkmaster()
|
|
print("master is down")
|
|
skynet.exit()
|
|
end
|
|
|
|
skynet.start(function()
|
|
print("Log server start")
|
|
skynet.monitor "simplemonitor"
|
|
local log = skynet.newservice("globallog")
|
|
skynet.fork(monitor_master)
|
|
end)
|
|
|