public interface LoadBalancerClient extends ServiceInstanceChooser
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(String serviceId,
LoadBalancerRequest<T> request)
execute request using a ServiceInstance from the LoadBalancer for the specified
service
|
<T> T |
execute(String serviceId,
ServiceInstance serviceInstance,
LoadBalancerRequest<T> request)
execute request using a ServiceInstance from the LoadBalancer for the specified
service
|
URI |
reconstructURI(ServiceInstance instance,
URI original)
Create a proper URI with a real host and port for systems to utilize.
|
choose
<T> T execute(String serviceId, LoadBalancerRequest<T> request) throws IOException
serviceId
- the service id to look up the LoadBalancerrequest
- allows implementations to execute pre and post actions such as
incrementing metricsIOException
<T> T execute(String serviceId, ServiceInstance serviceInstance, LoadBalancerRequest<T> request) throws IOException
serviceId
- the service id to look up the LoadBalancerserviceInstance
- the service to execute the request torequest
- allows implementations to execute pre and post actions such as
incrementing metricsIOException
URI reconstructURI(ServiceInstance instance, URI original)
instance
- original
- a URI with the host as a logical service nameCopyright © 2018 Pivotal Software, Inc.. All rights reserved.