Package org.kiwiproject.eureka
Class EurekaServer
- java.lang.Object
-
- org.kiwiproject.eureka.EurekaServer
-
public class EurekaServer extends Object
-
-
Constructor Summary
Constructors Constructor Description EurekaServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<com.netflix.discovery.shared.Application>
applicationsThatMatchVipAddressFromPath(String path)
void
cleanupApps()
Clears all applications, heartbeats, and heartbeat history from the running Eureka server.Optional<com.netflix.discovery.shared.Application>
getApplicationByName(String appName)
Optional<com.netflix.appinfo.InstanceInfo>
getInstance(String appId, String instanceId)
void
registerApplication(com.netflix.appinfo.InstanceInfo instance)
void
unregisterApplication(com.netflix.discovery.shared.Application application, String appName, String hostName)
void
updateHeartbeatFor(String appName, String hostName, int statusCode, com.netflix.appinfo.InstanceInfo.InstanceStatus instanceStatus)
-
-
-
Method Detail
-
getInstance
public Optional<com.netflix.appinfo.InstanceInfo> getInstance(String appId, String instanceId)
-
applicationsThatMatchVipAddressFromPath
public List<com.netflix.discovery.shared.Application> applicationsThatMatchVipAddressFromPath(String path)
-
cleanupApps
public void cleanupApps()
Clears all applications, heartbeats, and heartbeat history from the running Eureka server. Also resets the heartbeat failure count to zero.If you want a "fresh" Eureka server for each test, then call this in a
BeforeEach
orAfterEach
method.
-
updateHeartbeatFor
public void updateHeartbeatFor(String appName, String hostName, int statusCode, com.netflix.appinfo.InstanceInfo.InstanceStatus instanceStatus)
-
registerApplication
public void registerApplication(com.netflix.appinfo.InstanceInfo instance)
-
getApplicationByName
public Optional<com.netflix.discovery.shared.Application> getApplicationByName(String appName)
-
-