Class: Nomad::Operator
Defined Under Namespace
Classes: RaftConfiguration, RaftConfigurationItem
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#raft_configuration(**options) ⇒ Operator::Raft::Configuration
Queries the status of a nodes registered with Nomad in the Raft subsystem.
-
#remove_raft_peer(*addresses, **options) ⇒ Operator::Raft::Configuration
Queries the status of a nodes registered with Nomad in the Raft subsystem.
Methods inherited from Request
Constructor Details
This class inherits a constructor from Nomad::Request
Instance Method Details
#raft_configuration(**options) ⇒ Operator::Raft::Configuration
Queries the status of a nodes registered with Nomad in the Raft subsystem.
25 26 27 28 |
# File 'lib/nomad/api/operator.rb', line 25 def raft_configuration(**) json = client.get("/v1/operator/raft/configuration", ) return RaftConfiguration.decode(json) end |
#remove_raft_peer(*addresses, **options) ⇒ Operator::Raft::Configuration
Queries the status of a nodes registered with Nomad in the Raft subsystem.
43 44 45 46 47 48 |
# File 'lib/nomad/api/operator.rb', line 43 def remove_raft_peer(*addresses, **) raise "Missing address(es)!" if addresses.empty? qs = addresses.map { |v| "address=#{CGI.escape(v)}" }.join("&")[/.+/] client.delete("/v1/operator/raft/peer?#{qs}", ) return true end |