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 2022/09/06 06:11:37 UTC

[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7829: docs: refactor serverless plugins

SylviaBABY commented on code in PR #7829:
URL: https://github.com/apache/apisix/pull/7829#discussion_r963286887


##########
docs/zh/latest/plugins/serverless.md:
##########
@@ -23,19 +29,22 @@ title: serverless
 
 ## 描述
 
-serverless 的插件有两个,分别是 `serverless-pre-function` 和 `serverless-post-function`,
-前者会在指定阶段的最开始运行,后者是在指定阶段的最后运行。
+APISIX 有两个 `serverless` 插件:`serverless-pre-function` 和 `serverless-post-function`。
 
-这两个插件接收的参数都是一样的。
+`serverless-pre-function` 会在指定阶段开始时运行,`serverless-post-function` 后者是在指定阶段结束时运行。这两个插件使用相同的属性。

Review Comment:
   ```suggestion
   `serverless-pre-function` 插件会在指定阶段开始时运行,`serverless-post-function` 插件会在指定阶段结束时运行。这两个插件使用相同的属性。
   ```



##########
docs/zh/latest/plugins/serverless.md:
##########
@@ -60,18 +69,23 @@ local count = 1
 ngx.say(count)
 ```
 
-从 `v2.6` 版本开始,我们会把 `conf` 和 `ctx` 作为头两个参数传递给 serverless 函数,就跟一般的插件一样。
+:::
+
+:::note 注意
 
-`v2.12.0` 版本之前,`before_proxy` 这个 phase 曾被称作 `balancer`。考虑到这一方法事实上运行在 `access` 之后,代理到上游之前,跟 `balancer` 没有关系,新的命名会更加贴切。
+从 `v2.6` 版本开始,`conf` 和 `ctx` 作为前两个参数传递给 `serverless` 函数。
 
-## 示例
+`v2.12.0` 版本之前,`before_proxy` 阶段曾被称作 `balancer`。考虑到这一方法在 `access` 之后,和请求到上游之前运行,并且与 `balancer` 没有关联,因此已经更新为 `before_proxy`。

Review Comment:
   ```suggestion
   在 `v2.12.0` 版本之前,`before_proxy` 阶段曾被称作 `balancer`。考虑到这一方法是在 `access` 阶段之后、请求到上游之前运行,并且与 `balancer` 没有关联,因此已经更新为 `before_proxy`。
   ```



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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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