class Nomad::Status
Public Instance Methods
leader(options = {})
click to toggle source
Get the address and port of the current leader for this region
@example
Nomad.status.leader #=> "1.2.3.4:4647"
@option [String] :region
the region to query (by default, the region of the agent is queried)
@return [String]
# File lib/nomad/api/status.rb, line 23 def leader(options = {}) return client.get("/v1/status/leader", options) end
peers(options = [])
click to toggle source
Get the set of raft peers in the region.
@example
Nomad.status.peers #=> ["1.2.3.4:4647", "5.6.7.8:4647"]
@option [String] :region
the region to query (by default, the region of the agent is queried)
@return [Array<String>]
# File lib/nomad/api/status.rb, line 36 def peers(options = []) return client.get("/v1/status/peers", options) end