class Diplomat::Status
Methods for interacting with the Consul status API endpoints, leader and peers
Public Instance Methods
Source
# File lib/diplomat/status.rb, line 11 def leader(options = {}) ret = send_get_request(@conn, ['/v1/status/leader'], options) JSON.parse(ret.body) end
Get the raft leader for the datacenter in which the local consul agent is running @param options [Hash] options parameter hash @return [OpenStruct] the address of the leader
Source
# File lib/diplomat/status.rb, line 19 def peers(options = {}) ret = send_get_request(@conn, ['/v1/status/peers'], options) JSON.parse(ret.body) end
Get an array of Raft peers for the datacenter in which the agent is running @param options [Hash] options parameter hash @return [OpenStruct] an array of peers