1

I was looking at the documentation for UNLEASH feature toggle as I would like some add some feature-flag functionality in my Spring Boot application microservice (API).

I would like to "wrap" the logic in codebase with something like:

if(myCustomFeatureToggle.isActive()) {
    // do some stuff if toggle is ON
}

However, I believe the Unleash API has a UI web app you can access to turn these toggles ON or OFF (1 or 0). Someone has to manually type the URL into the browser and move a slider/UI element to turn ON or OFF the "feature". However, I would like to turn "ON" these toggles based on DATE range instead. For example, I would like to set a datetime like 2021-12-30 00:00:00, such that the toggle would become ACTIVE or ON on December 30, 2021 (without any manual intervention i.e. someone having to go to UI/web page and click some buttons). Having an "effective" and "end" date would also be awesome, i.e. end datetime for above example could be 2022-05-30 23:59:59, such that the toggle automatically turns OFF on May 30, 2022 at 11:59 PM.

Is this possible? do any feature flags libraries have this functionality?

ennth
  • 1,698
  • 5
  • 31
  • 63

1 Answers1

2

Yes this is possible with the help of custom activation strategies. The example do provide an example of exactly time based activation.

There also exists a issue request to support this native in Unleash. It could be good if you can add your use case as a comment on this issue.