Health

consul4s.v1.api.Health
trait Health[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 getAllServiceInstances(service: String, dc: Option[String], near: Option[String], tag: Option[String], nodeMeta: Option[String], passing: Boolean, filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String], cacheMode: CacheMode): F[Result[List[ServiceEntry]]]

GET /health/service/:service

GET /health/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.
passing
  • Specifies that the server should return only nodes with all checks in the passing state. This can be used to avoid additional filtering on the client side.
service
  • Specifies the service to list services for. This is provided as part of the URL.
tag
  • Specifies the tag to filter the list. 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

def getChecksByState(state: CheckStatus, dc: Option[String], near: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[List[HealthCheck]]]

GET /health/state/:state This endpoint returns the checks in the state provided on the path.

GET /health/state/:state This endpoint returns the checks in the state provided on the path.

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.
state
  • Specifies the state to query. Supported states are any, passing, warning, or critical. The any state is a wildcard that can be used to return all checks.
token
  • consul token

Attributes

def getHealthyServiceInstances(service: String, dc: Option[String], near: Option[String], tag: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String], cacheMode: CacheMode): F[Result[List[ServiceEntry]]]

Get healthy service instances. For additional info see Health.getAllServiceInstances

Get healthy service instances. For additional info see Health.getAllServiceInstances

Attributes

def getNodeChecks(node: String, dc: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[List[HealthCheck]]]

GET /health/node/:node This endpoint returns the checks specific to the node provided on the path.

GET /health/node/:node This endpoint returns the checks specific to the node provided on the path.

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
  • checks specific to the node provided on the path.
def getNodesForConnectCapableService(service: String, dc: Option[String], near: Option[String], tag: Option[String], nodeMeta: Option[String], passing: Boolean, filter: Option[String], token: Option[String]): F[Result[List[ServiceEntry]]]

GET /health/connect/:service This endpoint returns the nodes providing a Connect-capable service in a given datacenter. This will include both proxies and native integrations.

GET /health/connect/:service This endpoint returns the nodes providing a Connect-capable service in a given datacenter. This will include both proxies and native integrations.

Value parameters

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.
passing
  • Specifies that the server should return only nodes with all checks in the passing state. This can be used to avoid additional filtering on the client side.
tag
  • Specifies the tag to filter the list. 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

def getServiceChecks(service: String, dc: Option[String], near: Option[String], nodeMeta: Option[String], filter: Option[String], consistencyMode: ConsistencyMode, token: Option[String]): F[Result[List[HealthCheck]]]

GET /health/checks/:service This endpoint returns the checks associated with the service provided on the path.

GET /health/checks/:service This endpoint returns the checks associated with the service provided on the path.

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 service to list checks for. This is provided as part of the URL.
token
  • consul token

Attributes

Returns
  • checks associated with the service provided on the path.