NomadClient.Api.Search (nomad_client v0.13.1)

API calls for all endpoints tagged Search.

Link to this section Summary

Functions

Parameters

  • connection (NomadClient.Connection): Connection to server
  • fuzzy_search_request (FuzzySearchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.FuzzySearchResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • search_request (SearchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.SearchResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Link to this section Functions

Link to this function

get_fuzzy_search(connection, fuzzy_search_request, opts \\ [])

@spec get_fuzzy_search(
  Tesla.Env.client(),
  NomadClient.Model.FuzzySearchRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.FuzzySearchResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • fuzzy_search_request (FuzzySearchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.FuzzySearchResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_search(connection, search_request, opts \\ [])

@spec get_search(Tesla.Env.client(), NomadClient.Model.SearchRequest.t(), keyword()) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.SearchResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • search_request (SearchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.SearchResponse.t} on success
  • {:error, Tesla.Env.t} on failure