Class TogglzEndpoint

java.lang.Object
org.togglz.spring.boot.actuate.AbstractTogglzEndpoint
org.togglz.spring.boot.actuate.TogglzEndpoint

@Component @Endpoint(id="togglz") public class TogglzEndpoint extends AbstractTogglzEndpoint
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 Details

    • TogglzEndpoint

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

    • 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/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