PreparedQuery

consul4s.v1.api.PreparedQuery
trait PreparedQuery[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 executeQuery(queryUUID: String, dc: Option[String], near: Option[String], limit: Option[Int], connect: Boolean, token: Option[String], cacheMode: CacheMode): F[Result[Option[QueryResult]]]

GET /query/:uuid/execute This endpoint executes an existing prepared query.

GET /query/:uuid/execute This endpoint executes an existing prepared query.

Value parameters

cacheMode
connect
  • If true, limit results to nodes that are Connect-capable only. This can also be specified directly on the template itself to force all executions of a query to be Connect-only. See the template documentation for more information.
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.
limit
  • Limit the size of the list to the given number of nodes. This is applied after any sorting or shuffling.
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.
queryUUID
  • Specifies the UUID of the query to execute. This is required and is specified as part of the URL path. This can also be the name of an existing prepared query, or a name that matches a prefix name for a prepared query template.
token
  • consul token

Attributes

Returns
  • query result if query exists otherwise None.