Class NodeEntry

java.lang.Object
io.micronaut.discovery.consul.client.v1.NodeEntry
Direct Known Subclasses:
CatalogEntry

public class NodeEntry extends Object
Since:
1.0
Author:
graemerocher
  • Constructor Details

    • NodeEntry

      public NodeEntry(String nodeId, InetAddress address)
      Create a new catalog entry.
      Parameters:
      nodeId - The node ID
      address - The node address
  • Method Details

    • getTaggedAddresses

      public Map<String,String> getTaggedAddresses()
      See https://www.consul.io/api/catalog.html#taggedaddresses.
      Returns:
      The tagged addresses
    • setTaggedAddresses

      public void setTaggedAddresses(Map<String,String> taggedAddresses)
      See https://www.consul.io/api/catalog.html#taggedaddresses.
      Parameters:
      taggedAddresses - The tagged addresses
    • getNodeMetadata

      public Map<String,String> getNodeMetadata()
      See https://www.consul.io/api/catalog.html#nodemeta.
      Returns:
      The node metadata
    • nodeMetadata

      public NodeEntry nodeMetadata(Map<String,String> nodeMetadata)
      Parameters:
      nodeMetadata - The node metadata
      Returns:
      The NodeEntry instance
    • setNodeMetadata

      public void setNodeMetadata(Map<String,String> nodeMetadata)
      See https://www.consul.io/api/catalog.html#nodemeta.
      Parameters:
      nodeMetadata - The node metadata
    • getNode

      public String getNode()
      See https://www.consul.io/api/catalog.html#node.
      Returns:
      The node ID
    • getAddress

      public InetAddress getAddress()
      See https://www.consul.io/api/catalog.html#address.
      Returns:
      The node address
    • getDatacenter

      public Optional<String> getDatacenter()
      See https://www.consul.io/api/catalog.html#datacenter.
      Returns:
      The data center to use
    • setDatacenter

      public void setDatacenter(String datacenter)
      See https://www.consul.io/api/catalog.html#datacenter.
      Parameters:
      datacenter - The data center to use
    • datacenter

      public NodeEntry datacenter(String datacenter)
      Parameters:
      datacenter - The datacenter
      Returns:
      The NodeEntry instance
    • taggedAddresses

      public NodeEntry taggedAddresses(Map<String,String> taggedAddresses)
      Parameters:
      taggedAddresses - The tagged addresses
      Returns:
      The NodeEntry instance