Class: Consul::Client::Status
- Inherits:
-
Object
- Object
- Consul::Client::Status
- Includes:
- Base
- Defined in:
- lib/consul/client/status.rb
Instance Method Summary collapse
- #build_url(suffix) ⇒ Object
-
#leader ⇒ Object
Public: This endpoint is used to get the Raft leader for the datacenter in which the agent is running.
-
#peers ⇒ Object
Public: This endpoint retrieves the Raft peers for the datacenter in which the the agent is running.
Methods included from Base
Instance Method Details
#build_url(suffix) ⇒ Object
28 29 30 |
# File 'lib/consul/client/status.rb', line 28 def build_url(suffix) "#{base_versioned_url}/status/#{suffix}" end |
#leader ⇒ Object
Public: This endpoint is used to get the Raft leader for the datacenter in which the agent is running
Reference: www.consul.io/docs/agent/http/status.html
Returns: Address, host:port.
14 15 16 |
# File 'lib/consul/client/status.rb', line 14 def leader RestClient.get leader_url end |
#peers ⇒ Object
Public: This endpoint retrieves the Raft peers for the datacenter in which the the agent is running
Reference: www.consul.io/docs/agent/http/status.html
Returns: List of addresses.
24 25 26 |
# File 'lib/consul/client/status.rb', line 24 def peers RestClient.get peers_url end |