File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 14
14
-- See the License for the specific language governing permissions and
15
15
-- limitations under the License.
16
16
--
17
+ local healthcheck
18
+ local require = require
17
19
local roundrobin = require (" resty.roundrobin" )
18
20
local discovery = require (" apisix.discovery.init" ).discovery
19
21
local resty_chash = require (" resty.chash" )
20
22
local balancer = require (" ngx.balancer" )
21
23
local core = require (" apisix.core" )
22
- local healthcheck = require (" resty.healthcheck" )
23
24
local error = error
24
25
local str_char = string.char
25
26
local str_gsub = string.gsub
26
27
local pairs = pairs
27
28
local ipairs = ipairs
28
29
local tostring = tostring
30
+
29
31
local set_more_tries = balancer .set_more_tries
30
32
local get_last_failure = balancer .get_last_failure
31
33
local set_timeouts = balancer .set_timeouts
82
84
83
85
84
86
local function create_checker (upstream , healthcheck_parent )
87
+ if healthcheck == nil then
88
+ healthcheck = require (" resty.healthcheck" )
89
+ end
85
90
local checker = healthcheck .new ({
86
91
name = " upstream#" .. healthcheck_parent .key ,
87
92
shm_name = " upstream-healthcheck" ,
You can’t perform that action at this time.
0 commit comments