public class ServiceInstanceBackend extends Object
| Modifier and Type | Method | Description |
|---|---|---|
Optional<String> |
getDatacenter() |
|
List<String> |
listDatacenters() |
|
List<ServiceInstance> |
listInstances(String serviceName) |
Retrieves a list of service instances from Consul ordered by network distance (nearest to farthest) in the
local datacenter.
|
List<ServiceInstance> |
listInstances(String serviceName,
String datacenter) |
Retrieves a list of service instances from Consul ordered by network distance (nearest to farthest) in the
specified datacenter.
|
public List<ServiceInstance> listInstances(String serviceName)
serviceName - The name of the service to list.public List<ServiceInstance> listInstances(String serviceName, String datacenter)
serviceName - The name of the service to list.datacenter - The name of the datacenter to search.Copyright © 2019. All rights reserved.