Enable session affinity for canaries (#7371)
This commit is contained in:
parent
a327a809d9
commit
f222c752be
17 changed files with 1021 additions and 322 deletions
|
|
@ -65,4 +65,19 @@ function _M.split_upstream_addr(addrs_str)
|
|||
return host_and_ports
|
||||
end
|
||||
|
||||
-- Splits string by delimiter. Returns array of parsed values and the length of the array.
|
||||
function _M.split_string(what, delim)
|
||||
local result = {}
|
||||
local idx = 0
|
||||
|
||||
if what and delim and delim ~= "" then
|
||||
for chunk in what:gmatch("([^" .. delim .. "]+)") do
|
||||
idx = idx + 1
|
||||
result[idx] = chunk
|
||||
end
|
||||
end
|
||||
|
||||
return result, idx
|
||||
end
|
||||
|
||||
return _M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue