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/05/28 06:10:03 UTC

[GitHub] [apisix] Firstsawyou commented on issue #4329: 请问如何编写插件? 文档没有看明白

Firstsawyou commented on issue #4329:
URL: https://github.com/apache/apisix/issues/4329#issuecomment-850164649


   > 1. 我看到 https://github.com/apache/apisix/blob/master/apisix/plugins/openid-connect.lua 中有很多方法, 请问哪些是管道最开始执行的方法?
   
   Execute `_M.check_schema` first, and then execute the `_M.rewrite` method.
   For more information about plug-in development, you can refer to here: https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md
   
   > 2. 如果插件方法需要终止管道并且返回401, 该使用什么方法终止管道继续运行?
   
   Please see here: https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md#choose-phase-to-run
   
   > 3. 如何管理插件类及管道的生命周期?
   
   https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md
   https://github.com/moonbingbing/openresty-best-practices/blob/master/ngx_lua/phase.md
   
   > 4. 如何在已配置路由映射的情况下, 使用插件终止转发并返回插件中的结果?
   
   see:  https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/fault-injection.md
   
   > 5. 是否支持其他语言编写插件, 是否有传送门列表?
   
   Starting from APISIX 2.6, APISIX has begun to support running plug-ins written in languages ​​other than Lua. However, this feature is still under development and needs to continue to wait.
   


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