public interface LoadBalancerClient
Modifier and Type | Method and Description |
---|---|
ServiceInstance |
choose(String serviceId)
Choose a ServiceInstance from the LoadBalancer for the specified service
|
<T> T |
execute(String serviceId,
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.
|
ServiceInstance choose(String serviceId)
serviceId
- the service id to look up the LoadBalancer<T> T execute(String serviceId, LoadBalancerRequest<T> request)
serviceId
- the service id to look up the LoadBalancerrequest
- allows implementations to execute pre and post actions such as
incrementing metricsURI reconstructURI(ServiceInstance instance, URI original)
instance
- original
- a URI with the host as a logical service nameCopyright © 2015 Pivotal Software, Inc.. All rights reserved.