spacewander commented on code in PR #7036:
URL: https://github.com/apache/apisix/pull/7036#discussion_r871959242


##########
apisix/stream/xrpc/runner.lua:
##########
@@ -27,6 +27,19 @@ local pcall = pcall
 local ipairs = ipairs
 local tostring = tostring
 
+
+core.ctx.register_var("rpc_time", function(ctx)
+    local session = ctx.xrpc_session
+    local curr_ctx_id = session._currr_ctx_id
+    local curr_ctx = session._ctxs[curr_ctx_id]

Review Comment:
   Or we can pass ctx in 
https://github.com/apache/apisix/blob/4690feb421779f5b79e8dd990dc00f4d3f1052d0/apisix/core/ctx.lua#L343
 as var._ctx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to