Do not change config server order
@@ -17,12 +17,14 @@ import static java.util.stream.Collectors.toMap;
* @author hakon
*/
public class ConfigServerInfo {
+ private final List<String> configServerHostNames;
private final URI loadBalancerEndpoint;
private final Map<String, URI> configServerURIs;
private final AthenzService configServerIdentity;
public ConfigServerInfo(String loadBalancerHostName, List<String> configServerHostNames,
String scheme, int port, AthenzService configServerAthenzIdentity) {
+ this.configServerHostNames = configServerHostNames;
this.configServerURIs = createConfigServerUris(scheme, configServerHostNames, port);
this.loadBalancerEndpoint = createLoadBalancerEndpoint(loadBalancerHostName, scheme, port);
this.configServerIdentity = configServerAthenzIdentity;
@@ -33,7 +35,7 @@ public class ConfigServerInfo {
}
public List<String> getConfigServerHostNames() {
- return new ArrayList<>(configServerURIs.keySet());
+ return configServerHostNames;
}
public List<URI> getConfigServerUris() {
