• I use koin for DI in a KTOR project.
• I have hooked up Feature Flags from Unleash.
• I have an abstraction that basically is a "Feature" - when the unleash flag is toggled on, I load a lazy module with koin and when it is toggled off, I unload the module
• At the moment the "Feature" abstraction lets me register onLoad and onUnloaded callbacks
• In an onLoad callback I might find my Backend API singleton and register a new controller to it or something along these lines
• I have a Feature Manager and I had to give it a reference to Koin to let me do the onLoad and onUnloaded calling - just felt wrong. I think I would have preferred to have the module be able to self declare
I do get though that my use of Feature Flags might not be exactly right and was just curious if lifecycle management like that was considered out of scope