You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/04/27 09:09:03 UTC
[apisix] branch master updated: docs: correct @tparam format (#6915)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 7fe94aaf4 docs: correct @tparam format (#6915)
7fe94aaf4 is described below
commit 7fe94aaf4155a945b713cefba79499b667afa15a
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Wed Apr 27 17:08:54 2022 +0800
docs: correct @tparam format (#6915)
Signed-off-by: spacewander <sp...@gmail.com>
---
apisix/core/config_etcd.lua | 2 +-
apisix/core/config_util.lua | 2 +-
apisix/core/json.lua | 2 +-
apisix/stream/xrpc/sdk.lua | 22 +++++++++++-----------
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/apisix/core/config_etcd.lua b/apisix/core/config_etcd.lua
index 9d70ce96e..f022fa965 100644
--- a/apisix/core/config_etcd.lua
+++ b/apisix/core/config_etcd.lua
@@ -613,7 +613,7 @@ end
-- This function should be used in the `init_worker_by_lua` phase.
--
-- @function core.config.new
--- @tparam string etcd directory to be monitored, e.g. "/routes".
+-- @tparam string key etcd directory to be monitored, e.g. "/routes".
-- @tparam table opts Parameters related to the etcd client connection.
-- The keys in `opts` are as follows:
-- * automatic: whether to get the latest etcd data automatically
diff --git a/apisix/core/config_util.lua b/apisix/core/config_util.lua
index ae8ffdf6e..8a2ce7b57 100644
--- a/apisix/core/config_util.lua
+++ b/apisix/core/config_util.lua
@@ -90,7 +90,7 @@ end
-- A value without a suffix means seconds.
--
-- @function core.config_util.parse_time_unit
--- @tparam number|string Strings with time units, e.g. "60m".
+-- @tparam number|string s Strings with time units, e.g. "60m".
-- @treturn number Number of seconds after conversion
-- @usage
-- local seconds = core.config_util.parse_time_unit("60m") -- 3600
diff --git a/apisix/core/json.lua b/apisix/core/json.lua
index afad364ce..28834ac22 100644
--- a/apisix/core/json.lua
+++ b/apisix/core/json.lua
@@ -108,7 +108,7 @@ local delay_tab = setmetatable({data = "", force = false}, {
--
-- @function core.json.delay_encode
-- @tparam string|table data The data to be encoded.
--- @tparam boolean force Whether to clear the log buffer.
+-- @tparam boolean force encode data can't be encoded as JSON with tostring
-- @treturn table The table with the __tostring function overridden.
-- @usage
-- core.log.info("conf : ", core.json.delay_encode(conf))
diff --git a/apisix/stream/xrpc/sdk.lua b/apisix/stream/xrpc/sdk.lua
index 487ca392b..cea2dd1bf 100644
--- a/apisix/stream/xrpc/sdk.lua
+++ b/apisix/stream/xrpc/sdk.lua
@@ -37,8 +37,8 @@ local _M = {}
-- Returns the connected xRPC upstream socket according to the configuration
--
-- @function xrpc.sdk.connect_upstream
--- @tparam table selected upstream node
--- @tparam table upstream configuration
+-- @tparam table node selected upstream node
+-- @tparam table up_conf upstream configuration
-- @treturn table|nil the xRPC upstream socket, or nil if failed
function _M.connect_upstream(node, up_conf)
local sk = xrpc_socket.upstream.socket()
@@ -67,9 +67,9 @@ end
-- Returns disconnected xRPC upstream socket according to the configuration
--
-- @function xrpc.sdk.disconnect_upstream
--- @tparam table xRPC upstream socket
--- @tparam table upstream configuration
--- @tparam boolean is the upstream already broken
+-- @tparam table upstream xRPC upstream socket
+-- @tparam table up_conf upstream configuration
+-- @tparam boolean upstream_broken whether the upstream is already broken
function _M.disconnect_upstream(upstream, up_conf, upstream_broken)
if upstream_broken then
upstream:close()
@@ -84,8 +84,8 @@ end
-- Returns the request level ctx with an id
--
-- @function xrpc.sdk.get_req_ctx
--- @tparam table xrpc session
--- @tparam string optional ctx id
+-- @tparam table session xrpc session
+-- @tparam string id ctx id
-- @treturn table the request level ctx
function _M.get_req_ctx(session, id)
if not id then
@@ -111,8 +111,8 @@ end
-- Returns the new router if the stream routes are changed
--
-- @function xrpc.sdk.get_router
--- @tparam table xrpc session
--- @tparam string the current router version, should come from the last call
+-- @tparam table session xrpc session
+-- @tparam string version the current router version, should come from the last call
-- @treturn boolean whether there is a change
-- @treturn table the new router under the specific protocol
-- @treturn string the new router version
@@ -153,8 +153,8 @@ end
-- Set the session's current upstream according to the route's configuration
--
-- @function xrpc.sdk.set_upstream
--- @tparam table xrpc session
--- @tparam table the route configuration
+-- @tparam table session xrpc session
+-- @tparam table conf the route configuration
-- @treturn nil|string error message if present
function _M.set_upstream(session, conf)
local up