End points to set and get feature states
To utilise this library add this to your sbt build file
"dev.cjww.libs" % "feature-management_2.13" % "x.x.x"
Then add this to your application.conf
play.modules.enabled += "dev.cjww.modules.FeatureBindings"
users need to implement FeatureController
and finally, to be able to hit the routes add features.routes
to your routes file
Example request:
/feature/example-feature
Json response body:
//On Ok (200)
{
"feature" : "example-feature",
"state" : true //or false
}
Example request:
/features
Json response body:
//On Ok (200)
[
{
"feature" : "example-feature",
"state" : true
},
{
"feature" : "example-feature-2",
"state" : false
}
]
Example request:
/feature/example-feature/state/true
Json response body:
//On Ok (200)
{
"example-feature" : true
}
To be able to hit the shuttering routes add shuttering.routes
to your routes file and users need to implement shuttering controller
Hitting this route will shutter the service by setting the shuttered
property to true
Hitting this route will unshutter the service by setting the shuttered
property to false
This code is open source software licensed under the Apache 2.0 License