Package io.micronaut.discovery.consul
Class ConsulServiceInstance
java.lang.Object
io.micronaut.discovery.consul.ConsulServiceInstance
- All Implemented Interfaces:
io.micronaut.discovery.ServiceInstance
A
ServiceInstance
for Consul.- Since:
- 1.0
- Author:
- graemerocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.discovery.ServiceInstance
io.micronaut.discovery.ServiceInstance.Builder
-
Field Summary
Fields inherited from interface io.micronaut.discovery.ServiceInstance
GROUP, REGION, ZONE
-
Constructor Summary
ConstructorDescriptionConsulServiceInstance
(@NonNull ConsulHealthEntry healthEntry, @Nullable String scheme) Constructs aConsulServiceInstance
for the givenConsulHealthEntry
and scheme.ConsulServiceInstance
(@NonNull HealthEntry healthEntry, @Nullable String scheme) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.discovery.ServiceInstance
getGroup, getHost, getPort, getRegion, getZone, isSecure, resolve
-
Constructor Details
-
ConsulServiceInstance
public ConsulServiceInstance(@NonNull @NonNull ConsulHealthEntry healthEntry, @Nullable @Nullable String scheme) Constructs aConsulServiceInstance
for the givenConsulHealthEntry
and scheme.- Parameters:
healthEntry
- The health entryscheme
- The scheme
-
ConsulServiceInstance
@Deprecated(since="4.1.0", forRemoval=true) public ConsulServiceInstance(@NonNull @NonNull HealthEntry healthEntry, @Nullable @Nullable String scheme) Deprecated, for removal: This API element is subject to removal in a future version.Constructs aConsulServiceInstance
for the givenConsulHealthEntry
and scheme.- Parameters:
healthEntry
- The health entryscheme
- The scheme
-
-
Method Details
-
getHealthStatus
public io.micronaut.health.HealthStatus getHealthStatus()- Specified by:
getHealthStatus
in interfaceio.micronaut.discovery.ServiceInstance
-
getHealthEntry
Deprecated, for removal: This API element is subject to removal in a future version.not used- Returns:
- The
ConsulHealthEntry
-
getId
- Specified by:
getId
in interfaceio.micronaut.discovery.ServiceInstance
-
getInstanceId
- Specified by:
getInstanceId
in interfaceio.micronaut.discovery.ServiceInstance
-
getURI
- Specified by:
getURI
in interfaceio.micronaut.discovery.ServiceInstance
-
getMetadata
- Specified by:
getMetadata
in interfaceio.micronaut.discovery.ServiceInstance
-
ConsulServiceInstance(@io.micronaut.core.annotation.NonNull io.micronaut.discovery.consul.client.v1.ConsulHealthEntry,@io.micronaut.core.annotation.Nullable java.lang.String)
instead.