Package io.smallrye.stork.utils
Class StorkConfigUtils
java.lang.Object
io.smallrye.stork.utils.StorkConfigUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe load-balancer segment used in the configuration key.static final StringThe load balancer type configuration key.static final StringThe service-discovery segment used in the configuration key.static final StringThe service discovery type configuration key.static final StringThe service-registrar segment used in the configuration key.static final StringThe service discovery type configuration key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleServiceConfigstatic voidcomputeServiceProperty(Map<String, Map<String, String>> propertiesByServiceName, String propertyName, String propertyValue) Computes and stores service properties based on the provided property name and value.propertiesForPrefix(String prefix, Map<String, String> original) static StringpropertyKey(String text) static StringunwrapFromQuotes(String text)
-
Field Details
-
LOAD_BALANCER
The load-balancer segment used in the configuration key.- See Also:
-
LOAD_BALANCER_EMBEDDED
The load balancer type configuration key.- See Also:
-
SERVICE_DISCOVERY
The service-discovery segment used in the configuration key.- See Also:
-
SERVICE_DISCOVERY_EMBEDDED
The service discovery type configuration key.- See Also:
-
SERVICE_REGISTRAR
The service-registrar segment used in the configuration key.- See Also:
-
SERVICE_REGISTRAR_EMBEDDED
The service discovery type configuration key.- See Also:
-
-
Constructor Details
-
StorkConfigUtils
public StorkConfigUtils()
-
-
Method Details
-
computeServiceProperty
public static void computeServiceProperty(Map<String, Map<String, String>> propertiesByServiceName, String propertyName, String propertyValue) Computes and stores service properties based on the provided property name and value.This method processes a property name and value, extracting relevant information and storing it in a map based on the service name. The property name is expected to follow a specific pattern associated with SmallRye Stork, and it's used to determine the service name and property key. If the property name does not match the expected pattern, it will be logged as a warning.
- Parameters:
propertiesByServiceName- A map containing service properties indexed by service name.propertyName- The name of the property to compute.propertyValue- The value of the property to store.
-
buildServiceConfig
-
unwrapFromQuotes
-
propertyKey
-
propertiesForPrefix
-