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 2021/04/02 03:18:58 UTC

[GitHub] [apisix] spacewander opened a new pull request #3971: feat(serverless): pass conf & ctx to the functions

spacewander opened a new pull request #3971:
URL: https://github.com/apache/apisix/pull/3971


   Signed-off-by: spacewander <sp...@gmail.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #3971: feat(serverless): pass conf & ctx to the functions

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3971:
URL: https://github.com/apache/apisix/pull/3971#discussion_r606085000



##########
File path: docs/en/latest/plugins/serverless.md
##########
@@ -80,7 +82,7 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f03433
     "plugins": {
         "serverless-pre-function": {
             "phase": "rewrite",
-            "functions" : ["return function() ngx.log(ngx.ERR, \"serverless pre function\"); end"]
+            "functions" : ["return function(conf, ctx) ngx.log(ngx.ERR, \"serverless pre function\"); end"]

Review comment:
       I think we should add a new usage example of `conf & ctx` parameter. If we modify the original example, people can easily understand that the `conf & ctx` parameter is necessary.




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

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



[GitHub] [apisix] spacewander merged pull request #3971: feat(serverless): pass conf & ctx to the functions

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #3971:
URL: https://github.com/apache/apisix/pull/3971


   


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

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