Class TogglzEndpoint


  • @Component
    @Endpoint(id="togglz")
    public class TogglzEndpoint
    extends Object
    Spring Boot 2+ Endpoint to 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 Detail

      • TogglzEndpoint

        public TogglzEndpoint​(org.togglz.core.manager.FeatureManager featureManager)
    • Method Detail

      • 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/feature
        enabled - the name of the field containing the toggle/feature status
        strategy - the ID of the activation strategy to use
        parameters - activation strategy parameters as comma separated list of key=value pairs