You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/05/12 07:57:01 UTC

[incubator-apisix] branch master updated: doc: Added FAQ about how to reload your own plugin (#1568)

This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new e9eba07  doc: Added FAQ about how to reload your own plugin (#1568)
e9eba07 is described below

commit e9eba0708f6d282eca328b40b00079326c0ec678
Author: Yousa <sn...@gmail.com>
AuthorDate: Tue May 12 15:56:01 2020 +0800

    doc: Added FAQ about how to reload your own plugin (#1568)
---
 FAQ.md    | 14 ++++++++++++++
 FAQ_CN.md | 14 ++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/FAQ.md b/FAQ.md
index 4b56fce..c75218f 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -172,3 +172,17 @@ Steps:
 2. Restart APISIX
 
 Now you can trace the info level log in logs/error.log.
+
+## How to reload your own plugin
+
+The Apache APISIX plugin supports hot reloading. If your APISIX node has the Admin API turned on, then for scenarios such as adding / deleting / modifying plugins, you can hot reload the plugin by calling the HTTP interface without restarting the service.
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+If your APISIX node does not open the Admin API, then you can manually load the plug-in by reloading APISIX.
+
+```shell
+apisix reload
+```
diff --git a/FAQ_CN.md b/FAQ_CN.md
index 8d1e528..8221cd4 100644
--- a/FAQ_CN.md
+++ b/FAQ_CN.md
@@ -123,3 +123,17 @@ https://github.com/iresty/lua-resty-radixtree#operator-list
 2、重启APISIX
 
 之后便可以在logs/error.log中查看到info的日志了。
+
+## 如何加载自己编写的插件
+
+Apache APISIX 的插件支持热加载,如果你的 APISIX 节点打开了 Admin API,那么对于新增/删除/修改插件等场景,均可以通过调用 HTTP 接口的方式热加载插件,不需要重启服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+如果你的 APISIX 节点并没有打开 Admin API,那么你可以通过手动 reload APISIX 的方式加载插件。
+
+```shell
+apisix reload
+```