backnero commented on issue #2855:
URL: https://github.com/apache/apisix/issues/2855#issuecomment-734589523


   As long as routing, service, upstream and other information can be obtained, 
because yaml is used as the configuration center, configuration addition, 
deletion and modification will all be performed in yaml.
   
   ```
   -- function _M.api()
   --     return {
   --         {
   --             methods = {"GET"},
   --             uri = "/apisix/routers/",
   --             handler = getrouters,
   --         }
   --     }
   -- end
   ```
   Maybe it can be similar to this, I don't know what method should be used to 
obtain routing information.
   
   ```
       local co_yaml = read_apisix_yaml()
       -- local config_data = yaml.parse(co_yaml)
       core.log.error("yaml:::::: ",core.json.delay_encode(co_yaml))
   ```
   I try to use the method in core/conf_yaml.lua to get yaml information,
   
   Can print out part of the yaml content, but don’t know how to continue


----------------------------------------------------------------
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:
[email protected]


Reply via email to