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:
parent
2435167e1e
commit
3298ea1adf
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user