Catalog

consul4s.v1.api.Catalog
trait Catalog[F[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ConsulApi[F]
class ConsulClient[F]
Self type

Members list

Value members

Concrete methods

def deregisterEntity(value: NodeDeregistration, token: Option[String]): F[Result[Unit]]

PUT /catalog/deregister This endpoint is a low-level mechanism for directly removing entries from the Catalog. I

PUT /catalog/deregister This endpoint is a low-level mechanism for directly removing entries from the Catalog. I

Value parameters

token
  • consul token
value
  • entity filter

Attributes

Returns
  • unit
def getConnectCapableDatacenterServices(service: String, dc: Option[String], tag: Option[String], near: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[List[CatalogService]]]

GET /catalog/connect/ + service

GET /catalog/connect/ + service

Value parameters

consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
filter
  • Specifies the expression used to filter the queries results prior to returning the data.
near
  • Specifies to sort the resulting list in ascending order based on the estimated round trip time from that node. Passing ?near=_agent will use the agent's node for the sort. Passing ?near=_ip will use the source IP of the request or the value of the X-Forwarded-For header to lookup the node to use for the sort. If this is not present, the default behavior will shuffle the nodes randomly each time the query is executed.
nodeMeta
  • Specifies a desired node metadata key/value pair of the form key:value. This parameter can be specified multiple times, and will filter the results to nodes with the specified key/value pairs. This is specified as part of the URL as a query parameter.
service
  • Specifies the name of the service for which to list nodes. This is specified as part of the URL.
tag
  • Specifies the tag to filter on. This is specified as part of the URL as a query parameter. Can be used multiple times for additional filtering, returning only the results that include all of the tag values provided.
token
  • consul token

Attributes

Returns
  • This endpoint returns the nodes providing a Connect-capable service in a given datacenter.
def getDatacenterNodes(dc: Option[String], near: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[List[Node]]]

GET /catalog/nodes

GET /catalog/nodes

Value parameters

consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
filter
  • Specifies the expression used to filter the queries results prior to returning the data.
near
  • Specifies to sort the resulting list in ascending order based on the estimated round trip time from that node. Passing ?near=_agent will use the agent's node for the sort. Passing ?near=_ip will use the source IP of the request or the value of the X-Forwarded-For header to lookup the node to use for the sort. If this is not present, the default behavior will shuffle the nodes randomly each time the query is executed.
nodeMeta
  • Specifies a desired node metadata key/value pair of the form key:value. This parameter can be specified multiple times, and will filter the results to nodes with the specified key/value pairs. This is specified as part of the URL as a query parameter.
token
  • consul token

Attributes

Returns
  • This endpoint returns the nodes registered in a given datacenter.
def getDatacenterServiceNames(dc: Option[String], nodeMeta: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[Map[String, List[String]]]]

GET /catalog/services

GET /catalog/services

Value parameters

consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
nodeMeta
  • Specifies a desired node metadata key/value pair of the form key:value. This parameter can be specified multiple times, and will filter the results to nodes with the specified key/value pairs. This is specified as part of the URL as a query parameter.
token
  • consul token

Attributes

Returns
  • This endpoint returns the services registered in a given datacenter.
def getDatacenterServices(service: String, dc: Option[String], tag: Option[String], near: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String], cacheMode: CacheMode): F[Result[List[CatalogService]]]

GET /catalog/service/ + service

GET /catalog/service/ + service

Value parameters

cacheMode
consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
filter
  • Specifies the expression used to filter the queries results prior to returning the data.
near
  • Specifies to sort the resulting list in ascending order based on the estimated round trip time from that node. Passing ?near=_agent will use the agent's node for the sort. Passing ?near=_ip will use the source IP of the request or the value of the X-Forwarded-For header to lookup the node to use for the sort. If this is not present, the default behavior will shuffle the nodes randomly each time the query is executed.
nodeMeta
  • Specifies a desired node metadata key/value pair of the form key:value. This parameter can be specified multiple times, and will filter the results to nodes with the specified key/value pairs. This is specified as part of the URL as a query parameter.
service
  • Specifies the name of the service for which to list nodes. This is specified as part of the URL.
tag
  • Specifies the tag to filter on. This is specified as part of the URL as a query parameter. Can be used multiple times for additional filtering, returning only the results that include all of the tag values provided.
token
  • consul token

Attributes

Returns
  • This endpoint returns the nodes providing a service in a given datacenter.
def getDatacenters(token: Option[String]): F[Result[List[String]]]

GET /catalog/datacenters

GET /catalog/datacenters

Value parameters

token
  • consul token

Attributes

Returns
  • This endpoint returns the list of all known datacenters.
def getListOfNodeServices(node: String, dc: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[Option[NodeServiceList]]]

GET /catalog/node-services/:node

GET /catalog/node-services/:node

Value parameters

consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
filter
  • Specifies the expression used to filter the queries results prior to returning the data.
node
  • Specifies the name or ID of the node to query. This is specified as part of the URL
token
  • consul token

Attributes

Returns
  • This endpoint returns the node's registered services.
def getMapOfNodeServices(node: String, dc: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[Option[NodeServiceMap]]]

GET /catalog/node/:node

GET /catalog/node/:node

Value parameters

consistencyMode
dc
  • Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter. Using this across datacenters is not recommended.
filter
  • Specifies the expression used to filter the queries results prior to returning the data.
node
  • Specifies the name or ID of the node to query. This is specified as part of the URL
token
  • consul token

Attributes

Returns
  • This endpoint returns the node's registered services.
def registerEntity(value: NodeRegistration, token: Option[String]): F[Result[Unit]]

PUT /catalog/register This endpoint is a low-level mechanism for registering or updating entries in the catalog.

PUT /catalog/register This endpoint is a low-level mechanism for registering or updating entries in the catalog.

Value parameters

token
  • consul token
value
  • new entity

Attributes

Returns
  • unit