public class CatalogEntry extends NodeEntry
Constructor and Description |
---|
CatalogEntry(String nodeId,
InetAddress address)
Create a new catalog entry.
|
Modifier and Type | Method and Description |
---|---|
CatalogEntry |
datacenter(String datacenter) |
Optional<NewServiceEntry> |
getService()
See https://www.consul.io/api/catalog.html#service.
|
CatalogEntry |
nodeMetadata(Map<String,String> nodeMetadata) |
CatalogEntry |
service(NewServiceEntry service) |
void |
setService(NewServiceEntry service)
See https://www.consul.io/api/catalog.html#service.
|
CatalogEntry |
taggedAddresses(Map<String,String> taggedAddresses) |
getAddress, getDatacenter, getNode, getNodeMetadata, getTaggedAddresses, setDatacenter, setNodeMetadata, setTaggedAddresses
public CatalogEntry(String nodeId, InetAddress address)
nodeId
- The node IDaddress
- The node addresspublic CatalogEntry datacenter(String datacenter)
datacenter
in class NodeEntry
datacenter
- The datacenterNodeEntry
instancepublic CatalogEntry taggedAddresses(Map<String,String> taggedAddresses)
taggedAddresses
in class NodeEntry
taggedAddresses
- The tagged addressesNodeEntry
instancepublic CatalogEntry nodeMetadata(Map<String,String> nodeMetadata)
nodeMetadata
in class NodeEntry
nodeMetadata
- The node metadataNodeEntry
instancepublic Optional<NewServiceEntry> getService()
public void setService(NewServiceEntry service)
service
- The servicepublic CatalogEntry service(NewServiceEntry service)
service
- The serviceCatalogEntry
instance