kingluo commented on code in PR #9334:
URL: https://github.com/apache/apisix/pull/9334#discussion_r1196113194
##########
apisix/router.lua:
##########
@@ -22,34 +22,147 @@ local plugin_checker =
require("apisix.plugin").plugin_checker
local str_lower = string.lower
local error = error
local ipairs = ipairs
-
+local sub_str = string.sub
+local table = require("apisix.core.table")
+local json = require("apisix.core.json")
local _M = {version = 0.3}
+local function short_key(self, str)
+ return sub_str(str, #self.key + 2)
+end
-local function filter(route)
+local function filter(route, pre_route_obj, size)
Review Comment:
The function prototype is too obscure, `pre_route_obj` may contain different
types. It's better to split the radix tree reconstruction into another
function, e.g. `filter_all_routes`.
--
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]