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 2020/09/21 03:05:23 UTC

[GitHub] [apisix] tokers opened a new issue #2264: refactor bin/apisix

tokers opened a new issue #2264:
URL: https://github.com/apache/apisix/issues/2264


   As a part of APISIX ecosystem, the `bin/apisix` is also important, while current implementation is somewhat chaotic, and there are some bad smell in the code base.
   
   So what's the plan for the evolution of `bin/apisix`, maybe we can refactor it if possible, for the cleaner code base and better structure.


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



[GitHub] [apisix] tokers commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699732331


   I think the first thing that we can do is splitting this monomeric file into multiple modules, each as a Lua file, which enhances the readability and keeps the code base clean.
   
   The second one, might be devoting to optimize the interactivity? Such the output message, the fancy command options completion in bash/zsh.


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



[GitHub] [apisix] membphis commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699746746


   > I think the first thing that we can do is splitting this monomeric file into multiple modules, each as a Lua file, which enhances the readability and keeps the code base clean.
   
   we can implement this version first ^_^


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



[GitHub] [apisix] membphis commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699746419


   agree +1 to refactor `bin/apisix`
   
   the CLI is becoming more and more important.


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



[GitHub] [apisix] tokers commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699748620


   @membphis Let me deal it :)


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



[GitHub] [apisix] spacewander commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-741601489


   Solved.


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



[GitHub] [apisix] moonming commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699727008


   agreed +1
   do you have any idea about this?


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



[GitHub] [apisix] spacewander closed issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #2264:
URL: https://github.com/apache/apisix/issues/2264


   


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



[GitHub] [apisix] tokers commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-735515079


   We have separated some parts of the monomeric `bin/apisix`:
   
   * All auxiliary functions were moved to `apisix/cli/util.lua`;
   * All environmental factors were moved to `apisix/cli/env.lua`;
   * All operations about etcd were moved to `apisix/cli/etcd.lua`;
   * All file I/O operations were moved to `apisix/cli/file.lua`;
   * The template of nginx.conf was moved to `apisix/cli/ngx_tpl.lua`;
   
   Next we're about to refactoring all sub commands to ops.lua.
   
   


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



[GitHub] [apisix] moonming commented on issue #2264: refactor bin/apisix

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2264:
URL: https://github.com/apache/apisix/issues/2264#issuecomment-699727085


   @membphis please take a look


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