Dynamically change paths to match while running
Feature Description
I'm working on a Gin project that makes extensive use of path parameters (e.g. "/:object/:action"). Now I'm adding a facility where user plugins can add new paths to match, that may contain parameters. Therefore I need to add the new paths to Gin on module load, and remove them on module unload. Plugins can be loaded and unloaded at any time, not just on startup.
Is there a way to do this in Gin? If not, is it something the Gin developers would consider adding in the near future?
Hi @mochi-os , can you please explain this issue which would help me to work on? what exactly you are trying to do?
Thank you for replying. We're creating an application platform for running third party web apps. When the server starts, it loads all the apps it already has configured, including their web paths, and starts serving web requests from users for all the apps' web paths. This part is working correctly.
Administrators can then, when the server is running, install new apps with new web paths. In future versions, they'll also be able to uninstall existing apps.
In addition, apps are regularly checked for new versions, and if a new version is available the app is automatically upgraded. It is possible that the new version will have different web paths from the old version.
It appears that Gin doesn't provide any way to add new web paths when apps are installed or upgraded in the middle of running, or to remove web paths when apps are uninstalled or upgraded in the middle of running. Is that correct?