Class EurekaConfig
java.lang.Object
org.kiwiproject.registry.eureka.config.EurekaConfig
- Direct Known Subclasses:
EurekaRegistrationConfig
Base configuration class for Eureka registry client configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllows for adjustingregistryUrlsdomain at runtime.@NotBlank Stringorg.slf4j.event.LevelThe log level to use when logging HTTP call attempts that fail with an exception.A unique ID that will be used when logging HTTP call attempts to Eureka.org.slf4j.event.LevelThe log level to use when logging HTTP call attempts.booleanIf true, enables the addition of Eureka specific data to ServiceInstance.static StringGenerates aretryIdby appending the String value ofidentifierto "EurekaRegistryClient-".voidsetDomainOverride(String domainOverride) Allows for adjustingregistryUrlsdomain at runtime.voidsetIncludeNativeData(boolean includeNativeData) If true, enables the addition of Eureka specific data to ServiceInstance.voidsetRegistryUrls(String urlCsv) Set the comma-separate list of Eureka server URLs.voidsetRegistryUrls(List<String> urls) Convenience method to set Eureka server URLS from a list of URLs rather than a CSV string.voidsetRetryExceptionLogLevel(org.slf4j.event.Level retryExceptionLogLevel) The log level to use when logging HTTP call attempts that fail with an exception.voidsetRetryId(String id) Sets the retry ID to"EurekaRegistryClient-" + id.voidsetRetryProcessingLogLevel(org.slf4j.event.Level retryProcessingLogLevel) The log level to use when logging HTTP call attempts.
-
Constructor Details
-
EurekaConfig
public EurekaConfig()
-
-
Method Details
-
getRegistryUrls
- Returns:
- comma separated list of urls pointing to Eureka servers, with domains replaced if
domainOverrideis set
-
setRegistryUrls
Set the comma-separate list of Eureka server URLs.- Parameters:
urlCsv- a string containing the CSV string containing Eureka server URLs
-
setRegistryUrls
Convenience method to set Eureka server URLS from a list of URLs rather than a CSV string.- Parameters:
urls- the list of URLs to set
-
setRetryId
Sets the retry ID to"EurekaRegistryClient-" + id.- Parameters:
id- a unique identifier- See Also:
-
retryId
Generates aretryIdby appending the String value ofidentifierto "EurekaRegistryClient-".- Parameters:
identifier- the unique identifier to use- Returns:
- a new retry identifier
- Implementation Note:
- if
identifieras a String starts with "EurekaRegistryClient-", that value returned as-is
-
getDomainOverride
Allows for adjustingregistryUrlsdomain at runtime. This is useful if the urls are constant across services but a single service needs to access the server on a different domain due to networking restrictions -
isIncludeNativeData
public boolean isIncludeNativeData()If true, enables the addition of Eureka specific data to ServiceInstance. -
getRetryId
A unique ID that will be used when logging HTTP call attempts to Eureka.The default is "EurekaRegistryClient-" plus a unique integer, e.g. "EurekaRegistryClient-1", "EurekaRegistryClient-2", etc.
-
getRetryProcessingLogLevel
public org.slf4j.event.Level getRetryProcessingLogLevel()The log level to use when logging HTTP call attempts. The default is DEBUG. -
getRetryExceptionLogLevel
public org.slf4j.event.Level getRetryExceptionLogLevel()The log level to use when logging HTTP call attempts that fail with an exception. The default is WARN. -
setDomainOverride
Allows for adjustingregistryUrlsdomain at runtime. This is useful if the urls are constant across services but a single service needs to access the server on a different domain due to networking restrictions -
setIncludeNativeData
public void setIncludeNativeData(boolean includeNativeData) If true, enables the addition of Eureka specific data to ServiceInstance. -
setRetryProcessingLogLevel
public void setRetryProcessingLogLevel(org.slf4j.event.Level retryProcessingLogLevel) The log level to use when logging HTTP call attempts. The default is DEBUG. -
setRetryExceptionLogLevel
public void setRetryExceptionLogLevel(org.slf4j.event.Level retryExceptionLogLevel) The log level to use when logging HTTP call attempts that fail with an exception. The default is WARN.
-