@Client(id="consul", path="/v1", configuration=ConsulConfiguration.class) @Requires(beans=ConsulConfiguration.class) public abstract class AbstractConsulClient extends Object implements ConsulClient
ConsulClient
that also implements DiscoveryClient
.SERVICE_ID
Constructor and Description |
---|
AbstractConsulClient() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
A description that describes this object.
|
Publisher<List<ServiceInstance>> |
getInstances(String serviceId)
Obtain a list of
ServiceInstance for the given service id. |
Publisher<List<String>> |
getServiceIds() |
void |
setConsulConfiguration(ConsulConfiguration consulConfiguration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deregister, deregister, fail, fail, getHealthyServices, getHealthyServices, getMembers, getNodes, getNodes, getSelf, getServiceNames, getServices, pass, pass, putValue, readValues, readValues, register, register, status, warn, warn
@Inject public void setConsulConfiguration(ConsulConfiguration consulConfiguration)
consulConfiguration
- The Consul configurationpublic String getDescription()
Described
getDescription
in interface Described
public Publisher<List<String>> getServiceIds()
getServiceIds
in interface ConsulClient
getServiceIds
in interface DiscoveryClient
public Publisher<List<ServiceInstance>> getInstances(String serviceId)
DiscoveryClient
ServiceInstance
for the given service id.getInstances
in interface DiscoveryClient
serviceId
- The service idPublisher
that emits a list of ServiceInstance