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
-
Method Summary
Modifier and TypeMethodDescriptionAllows for adjustingregistryUrls
domain at runtime.@NotBlank String
org.slf4j.event.Level
The 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.Level
The log level to use when logging HTTP call attempts.boolean
If true, enables the addition of Eureka specific data to ServiceInstance.static String
Generates aretryId
by appending the String value ofidentifier
to "EurekaRegistryClient-".void
setDomainOverride
(String domainOverride) Allows for adjustingregistryUrls
domain at runtime.void
setIncludeNativeData
(boolean includeNativeData) If true, enables the addition of Eureka specific data to ServiceInstance.void
setRegistryUrls
(String urlCsv) Set the comma-separate list of Eureka server URLs.void
setRegistryUrls
(List<String> urls) Convenience method to set Eureka server URLS from a list of URLs rather than a CSV string.void
setRetryExceptionLogLevel
(org.slf4j.event.Level retryExceptionLogLevel) The log level to use when logging HTTP call attempts that fail with an exception.void
setRetryId
(String id) Sets the retry ID to"EurekaRegistryClient-" + id
.void
setRetryProcessingLogLevel
(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
domainOverride
is 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 aretryId
by appending the String value ofidentifier
to "EurekaRegistryClient-".- Parameters:
identifier
- the unique identifier to use- Returns:
- a new retry identifier
- Implementation Note:
- if
identifier
as a String starts with "EurekaRegistryClient-", that value returned as-is
-
getDomainOverride
Allows for adjustingregistryUrls
domain 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 adjustingregistryUrls
domain 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.
-