com.netflix.karyon.server.eureka
Class EurekaHandler
java.lang.Object
com.netflix.karyon.server.eureka.EurekaHandler
- All Implemented Interfaces:
- com.netflix.karyon.spi.ServiceRegistryClient
public class EurekaHandler
- extends java.lang.Object
- implements com.netflix.karyon.spi.ServiceRegistryClient
A handler for integrating with Eureka. This handler can be disabled
by setting a property PropertyNames.DISABLE_EUREKA_INTEGRATION as true.
If enabled, this class registers the application with eureka as a cloud instance iff the value of the property
PropertyNames.EUREKA_DATACENTER_TYPE_PROP_NAME is set to DataCenterInfo.Name#Amazon or
DataCenterInfo.Name#Netflix. In such a case, this class uses CloudInstanceConfig to register with
eureka. Otherwise MyDataCenterInstanceConfig is used as eureka config.
| Nested classes/interfaces inherited from interface com.netflix.karyon.spi.ServiceRegistryClient |
com.netflix.karyon.spi.ServiceRegistryClient.ServiceStatus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.slf4j.Logger logger
eurekaNamespace
@Configuration(value="com.netflix.karyon.eureka.properties.prefix",
documentation="Namespace for eureka related properties.")
protected java.lang.String eurekaNamespace
eurekaClientNamespace
@Configuration(value="com.netflix.karyon.eureka.client.properties.prefix",
documentation="Namespace for eureka client related properties.")
protected java.lang.String eurekaClientNamespace
datacenterType
@Configuration(value="com.netflix.karyon.eureka.datacenter.type",
documentation="Datacenter type used for initializing appropriate eureka instance configuration.")
protected java.lang.String datacenterType
EurekaHandler
@Inject
public EurekaHandler(EurekaHealthCheckCallback eurekaHealthCheckCallback,
HealthCheckInvocationStrategy healthCheckInvocationStrategy)
postConfig
@PostConstruct
public void postConfig()
register
public void register()
createEurekaInstanceConfig
protected com.netflix.appinfo.EurekaInstanceConfig createEurekaInstanceConfig()
markAsUp
public void markAsUp()
markAsDown
public void markAsDown()
updateStatus
public void updateStatus(com.netflix.karyon.spi.ServiceRegistryClient.ServiceStatus newStatus)
- Specified by:
updateStatus in interface com.netflix.karyon.spi.ServiceRegistryClient