Package org.togglz.spring.boot.actuate
Class TogglzEndpoint
- java.lang.Object
-
- org.togglz.spring.boot.actuate.TogglzEndpoint
-
@Component @Endpoint(id="togglz") public class TogglzEndpoint extends Object
Spring Boot 2+Endpointto expose Togglz info as an actuator endpoint. This endpoint is exposed as Spring Boot Actuator endpoint. It allows the user to get an overview of all available toggles without adding the togglz-console dependency. The user can also read the state of specific toggles and even enable or disable specific toggles.- Author:
- Rui Figueira
-
-
Constructor Summary
Constructors Constructor Description TogglzEndpoint(org.togglz.core.manager.FeatureManager featureManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TogglzFeature>getAllFeatures()TogglzFeaturegetFeature(String name)TogglzFeaturesetFeatureState(String name, Boolean enabled, String strategy, String parameters)Allows to change the state of toggles via http post.
-
-
-
Method Detail
-
getAllFeatures
@ReadOperation public List<TogglzFeature> getAllFeatures()
-
getFeature
@ReadOperation public TogglzFeature getFeature(@Selector String name)
-
setFeatureState
@WriteOperation public TogglzFeature setFeatureState(@Selector String name, @Nullable Boolean enabled, @Nullable String strategy, @Nullable String parameters)
Allows to change the state of toggles via http post.- Parameters:
name- the name of the toggle/featureenabled- the name of the field containing the toggle/feature statusstrategy- the ID of the activation strategy to useparameters- activation strategy parameters as comma separated list of key=value pairs
-
-