spacewander commented on a change in pull request #5331:
URL: https://github.com/apache/apisix/pull/5331#discussion_r736075818
##########
File path: apisix/plugins/grpc-transcode/util.lua
##########
@@ -14,31 +14,43 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-local core = require("apisix.core")
-local json = core.json
-local pb = require("pb")
-local ngx = ngx
-local pairs = pairs
-local ipairs = ipairs
-local string = string
-local tonumber = tonumber
-local type = type
+local core = require("apisix.core")
+local proto_fake_file =
require("apisix..plugins.grpc-transcode.proto").proto_fake_file
+local json = core.json
+local pb = require("pb")
+local ngx = ngx
+local ipairs = ipairs
+local string = string
+local tonumber = tonumber
+local type = type
local _M = {version = 0.1}
function _M.find_method(protos, service, method)
- for k, loaded in pairs(protos) do
- if type(loaded) == 'table' then
- local package = loaded.package
- for _, s in ipairs(loaded.service or {}) do
- if package .. "." .. s.name == service then
Review comment:
Can we preprocess the proto_obj in create_proto_obj, returns a two level
map with `pkg.service` + method?
--
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]