public class EurekaInstanceDiscovery extends CommonsInstanceDiscovery
InstanceDiscovery
implementation that uses Eureka (see https://github.com/Netflix/eureka) The plugin
requires a list of applications configured. It then queries the set of instances for
each application. Instance information retrieved from Eureka must be translated to
something that Turbine can understand i.e the
Instance class.
All the logic to perform this translation can be overriden here, so that you can provide your own implementation if needed.
FUSED_HOST_PORT_KEY, PORT_KEY, SECURE_PORT_KEY| Constructor and Description |
|---|
EurekaInstanceDiscovery(TurbineProperties turbineProperties,
com.netflix.discovery.EurekaClient eurekaClient) |
| Modifier and Type | Method and Description |
|---|---|
protected List<com.netflix.turbine.discovery.Instance> |
getInstancesForApp(String serviceId)
Private helper that fetches the Instances for each application.
|
protected Boolean |
parseInstanceStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus status)
Helper that returns whether the instance is Up of Down
|
addMetadata, getApplications, getClusterName, getClusterNameExpression, getInstance, getInstanceList, getTurbineProperties, isCombineHostPortpublic EurekaInstanceDiscovery(TurbineProperties turbineProperties, com.netflix.discovery.EurekaClient eurekaClient)
protected List<com.netflix.turbine.discovery.Instance> getInstancesForApp(String serviceId) throws Exception
getInstancesForApp in class CommonsInstanceDiscoveryserviceId - Exceptionprotected Boolean parseInstanceStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus status)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.