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
ConstructorsConstructorDescriptionConsulServiceInstance(@NonNull ConsulHealthEntry healthEntry, @Nullable String scheme) Constructs aConsulServiceInstancefor the givenConsulHealthEntryand 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, waitMethods 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 aConsulServiceInstancefor the givenConsulHealthEntryand 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 aConsulServiceInstancefor the givenConsulHealthEntryand scheme.- Parameters:
healthEntry- The health entryscheme- The scheme
-
-
Method Details
-
getHealthStatus
public io.micronaut.health.HealthStatus getHealthStatus()- Specified by:
getHealthStatusin 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:
getIdin interfaceio.micronaut.discovery.ServiceInstance
-
getInstanceId
- Specified by:
getInstanceIdin interfaceio.micronaut.discovery.ServiceInstance
-
getURI
- Specified by:
getURIin interfaceio.micronaut.discovery.ServiceInstance
-
getMetadata
- Specified by:
getMetadatain 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.