You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/23 02:43:01 UTC

[GitHub] [apisix] spacewander opened a new pull request #4114: feat: patch tcp.sock.connect to use our DNS resolver

spacewander opened a new pull request #4114:
URL: https://github.com/apache/apisix/pull/4114


   Fix #3719
   
   Signed-off-by: spacewander <sp...@gmail.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #4114: feat: patch tcp.sock.connect to use our DNS resolver

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4114:
URL: https://github.com/apache/apisix/pull/4114


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #4114: feat: patch tcp.sock.connect to use our DNS resolver

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #4114:
URL: https://github.com/apache/apisix/pull/4114#discussion_r619076945



##########
File path: apisix/core/resolver.lua
##########
@@ -0,0 +1,51 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local json = require("apisix.core.json")
+local log = require("apisix.core.log")
+local utils = require("apisix.core.utils")
+
+
+local _M = {}
+
+
+function _M.init_resolver(args)
+    local dns_resolver = args and args["dns_resolver"]
+    utils.set_resolver(dns_resolver)
+    log.info("dns resolver", json.delay_encode(dns_resolver, true))

Review comment:
       ```suggestion
       log.info("dns resolver ", json.delay_encode(dns_resolver, true))
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org