NomadClient.Api.Status (nomad_client v0.12.4)

API calls for all endpoints tagged Status.

Link to this section Summary

Functions

returns the address of the current leader in the region

returns the set of raft peers in the region

Link to this section Functions

Link to this function

get_leader(connection, opts \\ [])

Specs

get_leader(Tesla.Env.client(), keyword()) ::
  {:ok, String.t()} | {:error, Tesla.Env.t()}

returns the address of the current leader in the region

Parameters

  • connection (NomadClient.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :namespace (String.t):
    • :region (String.t): Make a request across regions to the given region
    • :index (integer()): index used for blocking requests
    • :wait (String.t): wait time used for blocking requests

      Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_peers(connection, opts \\ [])

Specs

get_peers(Tesla.Env.client(), keyword()) ::
  {:ok, [String.t()]} | {:error, Tesla.Env.t()}

returns the set of raft peers in the region

Parameters

  • connection (NomadClient.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :namespace (String.t):
    • :region (String.t): Make a request across regions to the given region
    • :index (integer()): index used for blocking requests
    • :wait (String.t): wait time used for blocking requests

      Returns

, ...]} on success {:error, Tesla.Env.t} on failure