1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

add sidecar health check interval configuration item.

This commit is contained in:
fangjian0423 2019-09-26 18:55:55 +08:00
parent 2435167e1e
commit 3298ea1adf
2 changed files with 14 additions and 1 deletions

View File

@ -71,7 +71,7 @@ public class SidecarHealthChecker {
this.sidecarDiscoveryClient.deregisterInstance(applicationName, ip, port); this.sidecarDiscoveryClient.deregisterInstance(applicationName, ip, port);
} }
}, 0, 30, TimeUnit.SECONDS); }, 0, sidecarProperties.getHealthCheckInterval(), TimeUnit.MILLISECONDS);
} }
} }

View File

@ -51,6 +51,11 @@ public class SidecarProperties {
*/ */
private URI healthCheckUrl; private URI healthCheckUrl;
/**
* interval of health check.
*/
private long healthCheckInterval =30000L;
public String getIp() { public String getIp() {
return ip; return ip;
} }
@ -75,4 +80,12 @@ public class SidecarProperties {
this.healthCheckUrl = healthCheckUrl; this.healthCheckUrl = healthCheckUrl;
} }
public long getHealthCheckInterval() {
return healthCheckInterval;
}
public void setHealthCheckInterval(long healthCheckInterval) {
this.healthCheckInterval = healthCheckInterval;
}
} }