Skip to content

Commit 2653fce

Browse files
committed
remote_v2: define standard functions
1 parent fdde633 commit 2653fce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gateway/src/apicast/configuration_loader/remote_v2.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ end
250250
-- @param env gateway environment
251251
-- @param page page in the paginated list. Defaults to 1 for the API, as the client will not send the page param.
252252
-- @param per_page number of results per page. Default and max is 500 for the API, as the client will not send the per_page param.
253-
local proxy_configs_per_page = function(http_client, portal_endpoint, host, env, page, per_page)
253+
local function proxy_configs_per_page(http_client, portal_endpoint, host, env, page, per_page)
254254
local args = { host = host, version = "latest", page = page, per_page = per_page }
255255

256256
local query_args = '?'..ngx.encode_args(args)
@@ -350,7 +350,7 @@ function _M:call(host)
350350
end
351351
end
352352

353-
local services_subset = function()
353+
local function services_subset()
354354
local services = resty_env.value('APICAST_SERVICES_LIST') or resty_env.value('APICAST_SERVICES')
355355
if resty_env.value('APICAST_SERVICES') then ngx.log(ngx.WARN, 'DEPRECATION NOTICE: Use APICAST_SERVICES_LIST not APICAST_SERVICES as this will soon be unsupported') end
356356
if services and len(services) > 0 then
@@ -368,7 +368,7 @@ end
368368
-- @param portal_endpoint 3scale API endpoint
369369
-- @param page page in the paginated list. Defaults to 1 for the API, as the client will not send the page param.
370370
-- @param per_page number of results per page. Default and max is 500 for the API, as the client will not send the per_page param.
371-
local services_per_page = function(http_client, portal_endpoint, page, per_page)
371+
local function services_per_page(http_client, portal_endpoint, page, per_page)
372372
local encoded_args = ngx.encode_args({page = page, per_page = per_page})
373373
local query_args = encoded_args ~= '' and '?'..encoded_args
374374
local base_url = services_index_endpoint(portal_endpoint)

0 commit comments

Comments
 (0)