mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(elasticache): return reachable Memcached configuration endpoints (#1258)
This commit is contained in:
1 parent
2aebe174d5
commit
94ad081241
3 files changed
+40
-6
No files matched your search
+5
-1
@@ -51,7 +51,7 @@ public class ElastiCacheMemcachedService {
|
||||
|
||||
ElastiCacheContainerHandle handle = containerManager.start(clusterId, image);
|
||||
|
||||
String endpointHost = config.hostname().orElse("localhost");
|
||||
String endpointHost = resolveEndpointHost(handle);
|
||||
Endpoint endpoint = new Endpoint(endpointHost, handle.getPort());
|
||||
|
||||
CacheCluster cluster = new CacheCluster(
|
||||
@@ -98,4 +98,8 @@ public class ElastiCacheMemcachedService {
|
||||
LOG.infov("Memcached cluster {0} deleted", clusterId);
|
||||
return cluster;
|
||||
}
|
||||
|
||||
private String resolveEndpointHost(ElastiCacheContainerHandle handle) {
|
||||
return config.hostname().orElse(handle.getHost());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user