Class NodeEntry
java.lang.Object
io.micronaut.discovery.consul.client.v1.NodeEntry
- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondatacenter(String datacenter) Deprecated, for removal: This API element is subject to removal in a future version.UsegetHostString()and resolve the address where it is needed.See https://www.consul.io/api/catalog.html#datacenter.See https://www.consul.io/api/catalog.html#address.getNode()See https://www.consul.io/api/catalog.html#node.See https://www.consul.io/api/catalog.html#nodemeta.See https://www.consul.io/api/catalog.html#taggedaddresses.nodeMetadata(Map<String, String> nodeMetadata) voidsetDatacenter(String datacenter) See https://www.consul.io/api/catalog.html#datacenter.voidsetNodeMetadata(Map<String, String> nodeMetadata) See https://www.consul.io/api/catalog.html#nodemeta.voidsetTaggedAddresses(Map<String, String> taggedAddresses) See https://www.consul.io/api/catalog.html#taggedaddresses.taggedAddresses(Map<String, String> taggedAddresses)
-
Constructor Details
-
NodeEntry
-
NodeEntry
Deprecated, for removal: This API element is subject to removal in a future version.UseNodeEntry(String, String)instead.Create a new catalog entry. The address is stored as its host name, or as its IP literal when it has no host name.- Parameters:
nodeId- The node IDaddress- The node address
-
-
Method Details
-
getTaggedAddresses
-
setTaggedAddresses
-
getNodeMetadata
-
nodeMetadata
-
setNodeMetadata
-
getNode
-
getHostString
See https://www.consul.io/api/catalog.html#address.- Returns:
- The node address as sent by Consul, a host name or an IP literal. It is not resolved.
- Since:
- 5.2.0
-
getAddress
Deprecated, for removal: This API element is subject to removal in a future version.UsegetHostString()and resolve the address where it is needed.See https://www.consul.io/api/catalog.html#address.The address is resolved on each call, which needs a DNS lookup when Consul sent a host name.
- Returns:
- The resolved node address, or
nullif there is none - Throws:
UncheckedIOException- if the host name cannot be resolved
-
getDatacenter
-
setDatacenter
See https://www.consul.io/api/catalog.html#datacenter.- Parameters:
datacenter- The data center to use
-
datacenter
-
taggedAddresses
-
NodeEntry(String, String)instead.