You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kingluo (via GitHub)" <gi...@apache.org> on 2023/03/10 08:00:50 UTC

[GitHub] [apisix] kingluo commented on a diff in pull request #9012: feat: move server-info plugin into core

kingluo commented on code in PR #9012:
URL: https://github.com/apache/apisix/pull/9012#discussion_r1132056079


##########
apisix/plugin.lua:
##########
@@ -746,6 +746,10 @@ function _M.init_worker()
     -- see https://github.com/apache/apisix/issues/3286
     _M.load()
 
+    if is_http then
+        require("apisix.plugins.server-info").init_worker()

Review Comment:
   Do you mean moving `server-info.lua` to elsewhere? But we should keep compatibility so that users could still use this plugin like before but with warning logs.
   If only for `init_worker()` function, then because it's tightly coupled with symbols in `server-info.lua`, so it seems no clean way to separate it.
   And I think it's not so necessary. `apisix/plugin.lua` is exactly used to load a specific plugin. In fact, in the same function, it also requires Prometheus plugin with a similar path:
   https://github.com/apache/apisix/blob/09cc4946bc051452960975b4dd7436a2497df346/apisix/plugin.lua#L740



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