Annotation Interface ServiceDiscoveryAttribute


@Retention(RUNTIME) @Target(TYPE) @Repeatable(ServiceDiscoveryAttributes.class) public @interface ServiceDiscoveryAttribute
Defines an attribute for a service discovery. The name of the attribute corresponds to the value used in the configuration, e.g. for name my-attribute, use the following to set the value: stork.<my-service>.service-discovery.my-attribute In the configuration class generated for the service discovery, this attribute will be exposed through getMyAttribute()
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Description of the attribute.
    Attribute name as used in the configuration.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Default value for the attribute.
    boolean
    Whether the attribute is mandatory or optional
  • Element Details

    • name

      String name
      Attribute name as used in the configuration. Exposed through a getter with name converted to camelCase with characters that cannot be used in a java identifiers filtered out.
      Returns:
      the name of the configuration property
    • defaultValue

      String defaultValue
      Default value for the attribute. If not provided and user didn't set the value - null will be passed
      Returns:
      the default value
      Default:
      "__$$_DEFAULT_VALUE_$$__"
    • description

      String description
      Description of the attribute. Works best in the documentation if it starts with a capital letter and ends with period.
      Returns:
      the description
    • required

      boolean required
      Whether the attribute is mandatory or optional
      Returns:
      true if the attribute is required, false otherwise
      Default:
      false