public class ConsulServerList extends com.netflix.loadbalancer.AbstractServerList<ConsulServer>
Constructor and Description |
---|
ConsulServerList(com.ecwid.consul.v1.ConsulClient client,
ConsulDiscoveryProperties properties) |
Modifier and Type | Method and Description |
---|---|
protected com.ecwid.consul.v1.QueryParams |
createQueryParamsForClientRequest()
This method will create the
QueryParams to use when retrieving the
services from Consul. |
protected com.ecwid.consul.v1.ConsulClient |
getClient() |
protected String |
getDatacenter() |
List<ConsulServer> |
getInitialListOfServers() |
protected ConsulDiscoveryProperties |
getProperties() |
protected String |
getServiceId() |
protected String |
getTag() |
List<ConsulServer> |
getUpdatedListOfServers() |
void |
initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig) |
String |
toString() |
protected List<ConsulServer> |
transformResponse(List<com.ecwid.consul.v1.health.model.HealthService> healthServices)
Transforms the response from Consul in to a list of usable
ConsulServer s. |
public ConsulServerList(com.ecwid.consul.v1.ConsulClient client, ConsulDiscoveryProperties properties)
protected com.ecwid.consul.v1.ConsulClient getClient()
protected ConsulDiscoveryProperties getProperties()
protected String getServiceId()
public void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)
public List<ConsulServer> getInitialListOfServers()
public List<ConsulServer> getUpdatedListOfServers()
protected List<ConsulServer> transformResponse(List<com.ecwid.consul.v1.health.model.HealthService> healthServices)
ConsulServer
s.healthServices
- the initial list of servers from Consul. Guaranteed to be non-empty listConsulServer.ConsulServer(HealthService)
protected com.ecwid.consul.v1.QueryParams createQueryParamsForClientRequest()
QueryParams
to use when retrieving the
services from Consul. By default QueryParams.DEFAULT
is used. In case
a datacenter is specified for the current serviceId QueryParams.datacenter
is set.QueryParams
protected String getTag()
protected String getDatacenter()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.