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 2021/07/06 08:27:26 UTC

[GitHub] [apisix] Huweicai opened a new issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

Huweicai opened a new issue #4545:
URL: https://github.com/apache/apisix/issues/4545


   I have several plugins being miggrated from **Kong** to **APISIX**.
   In Kong, plugins share variables use [kong.ctx.shared](https://docs.konghq.com/gateway-oss/2.4.x/pdk/kong.ctx/#kongctxshared) to work together.
   I wonder what's the most recommended way to do it in APISIX?
   Can I just attach these variables to ctx ? Like this:
   ```
   function _M.access(conf, ctx)
       ctx.var1 = "xxxx"
       ctx.var2 = "xxxx"
       core.log.warn(ctx.var1)
       core.log.warn(ctx.var2)
   end
   ```


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



[GitHub] [apisix] Huweicai closed issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   


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



[GitHub] [apisix] spacewander commented on issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   Yes. If you worry about name conflict, you can add your plugin name as the prefix.


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



[GitHub] [apisix] Huweicai commented on issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   > Yes. If you worry about name conflict, you can add your plugin name as the prefix.
   
   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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Huweicai commented on issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   > Yes. If you worry about name conflict, you can add your plugin name as the prefix.
   
   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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Huweicai closed issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   


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



[GitHub] [apisix] spacewander commented on issue #4545: request help: what's the most recommended way to share variables between plugins in a single request

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


   Yes. If you worry about name conflict, you can add your plugin name as the prefix.


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