Skip to content

Commit

Permalink
post event when rpc is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Dec 18, 2024
1 parent be7e356 commit 6674fac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kong/clustering/rpc/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ function _M:_meta_call(c, meta_cap, node_id)
list = capabilities_list,
}

-- tell outside that rpc is ready
local worker_events = assert(kong.worker_events)

local ok, err = worker_events.post_local("clustering:jsonrpc", "connected",
capabilities_list)
if not ok then
ngx_log(ngx_ERR, _log_prefix, "unable to post rpc connected event: ", err)
end

return true
end

Expand Down

0 comments on commit 6674fac

Please sign in to comment.