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/03/09 13:37:22 UTC

[GitHub] [incubator-apisix] agile6v opened a new issue #1225: GSoC: Support echo plugin

agile6v opened a new issue #1225: GSoC: Support echo plugin
URL: https://github.com/apache/incubator-apisix/issues/1225
 
 
   APISIX currently provides a simple example plugin, but it does not provide useful functionality. So we can provide a useful plugin to help users understand as fully as possible how to develop an APISIX plugin.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225: feature: Support echo plugin
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-596615082
 
 
   This plugin could implement the corresponding functionality in the common phases such as `init`, `rewrite`, `access`, `balancer`, `header filer`, `body filter` and `log` . But the specific functionality are still being considered.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225: feature: Support echo plugin
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-596542008
 
 
   Hi @agile6v @moonming  will be applying for GSoC 2020 this year. Would like to give it a try with apache APISIX. I did GSoC 2019 with openMRS. Is there a chat room which talks about the project idea.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1225: feature: Support echo plugin
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-596564552
 
 
   @Akayeshmantha Cool, you can add your ideas to https://cwiki.apache.org/confluence/display/COMDEV/GSoC+2020+Ideas+list, and we can talk about in slack: https://the-asf.slack.com/
   , and serach the `apisix` channel.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-637385962


   @agile6v  @membphis  @moonming  any idea about how it is now. Can we review 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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-628646538


   @agile6v  sure think that is a good way to start.


----------------------------------------------------------------
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] [incubator-apisix] Akayeshmantha edited a comment on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636339530


   Hi @agile6v so from what I get when it comes to the output_filter phase we should replicate what we have in https://github.com/openresty/echo-nginx-module/blob/master/src/ngx_http_echo_module.c#L412 ?
   
   or simply 
   function _M.output_filter(conf, ctx)
       ngx.var.echo_request_body hello;
   end
   something like 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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-628388129


   @membphis @moonming  would like to work on 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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-628388018


   @agile6v so what is the path we are taking implmenting a new plugin or extending the existing plugin 🙂


----------------------------------------------------------------
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] [incubator-apisix] membphis closed issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
membphis closed issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225


   


----------------------------------------------------------------
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] [incubator-apisix] moonming edited a comment on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
moonming edited a comment on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636331528


   @agile6v you'd better show same specific examples in Apache APISIX


----------------------------------------------------------------
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] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636483692


   Hi @Akayeshmantha 
   
   We can refer to the implementation of the plugin [response-rewrite](https://github.com/apache/incubator-apisix/blob/master/apisix/plugins/response-rewrite.lua#L98).  It has the ability to override the response body.  In the echo plugin we implement the function like this:
   
   ```shell
   function _M.body_filter(conf, ctx)
       conf.before_body + response.body + conf.after_body
   end
   ```
   
   FYI: https://github.com/openresty/lua-nginx-module#body_filter_by_lua
   
   Hope I've described it clearly.
   
   Thanks.
    


----------------------------------------------------------------
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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636507311


   @agile6v  I drafted a small sample can you look in the PR ?


----------------------------------------------------------------
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] [incubator-apisix] membphis commented on issue #1225: feature: Support echo plugin

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


   @agile6v 
   
   Can you provide some use cases?
   For example, what configuration options are there for this plugin, and the expected execution results?


----------------------------------------------------------------
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] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636265126


   Hi @Akayeshmantha This [example](https://github.com/openresty/echo-nginx-module#echo_before_body) can be used as a reference. Not sure I've made it a clear. If you have any questions, welcome to discuss here. 
   
   Thanks.


----------------------------------------------------------------
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] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-628643703


   > @agile6v so what is the path we are taking implmenting a new plugin or extending the existing plugin 🙂
   
   Hi @Akayeshmantha Remember that you submitted a proposal at GSOC. How about we follow that plan? 
   
   First we implement a simple echo function and then implement a function that modify the response body. For example, adding content before or after the response body.
   
   Thanks.


----------------------------------------------------------------
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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636321027


   Hi @agile6v  
   So you mean we are going to install https://github.com/openresty/echo-nginx-module#installation echo nginx module and use them for the plugin ?


----------------------------------------------------------------
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] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636322848


   > Hi @agile6v
   > So you mean we are going to install https://github.com/openresty/echo-nginx-module#installation echo nginx module and use them for the plugin ?
   > 
   > Or are we going with nginx.logging()
   
   
   @Akayeshmantha  We're going to implement an echo plugin, right? So we refer to its [features](https://github.com/openresty/echo-nginx-module#echo_before_body) to implement APISIX's echo plugin?
   
   Thanks.
   
   


----------------------------------------------------------------
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] [incubator-apisix] agile6v commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-628337158


   Hi @Akayeshmantha 
   
   As far as i am concerned, this plugin is still necessary to help other people understand how to implement a plugin as fully as possible. 
   
   Thanks.


----------------------------------------------------------------
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] [incubator-apisix] Akayeshmantha commented on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636339530


   Hi @agile6v so from what I get when it comes to the output_filter phase we should replicate what we have in https://github.com/openresty/echo-nginx-module/blob/master/src/ngx_http_echo_module.c#L412 ?


----------------------------------------------------------------
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] [incubator-apisix] moonming commented on issue #1225: feature: Support echo plugin

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


   @agile6v you'd better show same specific examples


----------------------------------------------------------------
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] [incubator-apisix] Akayeshmantha edited a comment on issue #1225: feature: Support echo plugin

Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1225:
URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636321027


   Hi @agile6v  
   So you mean we are going to install https://github.com/openresty/echo-nginx-module#installation echo nginx module and use them for the plugin ?
   
   Or are we going with nginx.logging()


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