docs: update the plugin-develop.md doc (#3705)

This commit is contained in:
Yuelin Zheng 2021-03-01 15:58:59 +08:00 committed by GitHub
parent 46c649596f
commit 7686cb4955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -85,8 +85,8 @@ The plugin itself provides the init method. It is convenient for plugins to perf
the plugin is loaded. the plugin is loaded.
Note : if the dependency of some plugin needs to be initialized when Nginx start, you may need to add logic to the initialization Note : if the dependency of some plugin needs to be initialized when Nginx start, you may need to add logic to the initialization
method "http_init" in the file __apisix.lua__, And you may need to add some processing on generated part of Nginx method "http_init" in the file __apisix/init.lua__, and you may need to add some processing on generated part of Nginx
configuration file in __bin/apisix__ file. but it is easy to have an impact on the overall situation according to the configuration file in __apisix/cli/ngx_tpl.lua__ file. But it is easy to have an impact on the overall situation according to the
existing plugin mechanism, we do not recommend this unless you have a complete grasp of the code. existing plugin mechanism, we do not recommend this unless you have a complete grasp of the code.
## name and config ## name and config

View File

@ -34,7 +34,7 @@ title: 插件开发
## 检查外部依赖 ## 检查外部依赖
如果你的插件,涉及到一些外部的依赖和三方库,请首先检查一下依赖项的内容。 如果插件需要用到共享内存,需要在 __bin/apisix__ 文 如果你的插件,涉及到一些外部的依赖和三方库,请首先检查一下依赖项的内容。 如果插件需要用到共享内存,需要在 __apisix/cli/ngx_tpl.lua__ 文
件里面进行申明,例如: 件里面进行申明,例如:
```nginx ```nginx
@ -53,8 +53,8 @@ title: 插件开发
插件本身提供了 init 方法。方便插件加载后做初始化动作。 插件本身提供了 init 方法。方便插件加载后做初始化动作。
注:如果部分插件的功能实现,需要在 Nginx 初始化启动,则可能需要在 __apisix.lua__ 文件的初始化方法 http_init 中添加逻辑,并且 注:如果部分插件的功能实现,需要在 Nginx 初始化启动,则可能需要在 __apisix/init.lua__ 文件的初始化方法 http_init 中添加逻辑,并且
可能需要在 __bin/apisix__ 文件中,对 Nginx 配置文件生成的部分,添加一些你需要的处理。但是这样容易对全局产生影响,根据现有的 可能需要在 __apisix/cli/ngx_tpl.lua__ 文件中,对 Nginx 配置文件生成的部分,添加一些你需要的处理。但是这样容易对全局产生影响,根据现有的
插件机制,我们不建议这样做,除非你已经对代码完全掌握。 插件机制,我们不建议这样做,除非你已经对代码完全掌握。
## 插件命名与配置 ## 插件命名与配置