class Diplomat::Autopilot
Methods for interacting with the Consul operator autopilot API endpoint
Public Instance Methods
get_configuration(options = {})
click to toggle source
Get autopilot configuration @param options [Hash] options parameter hash @return [OpenStruct] all data associated with the autopilot configuration
# File lib/diplomat/autopilot.rb, line 11 def get_configuration(options = {}) custom_params = [] custom_params << use_named_parameter('dc', options[:dc]) if options[:dc] ret = send_get_request(@conn, ['/v1/operator/autopilot/configuration'], options, custom_params) JSON.parse(ret.body) end
get_health(options = {})
click to toggle source
Get health status from the autopilot @param options [Hash] options parameter hash @return [OpenStruct] all data associated with the health of the autopilot
# File lib/diplomat/autopilot.rb, line 22 def get_health(options = {}) custom_params = [] custom_params << use_named_parameter('dc', options[:dc]) if options[:dc] ret = send_get_request(@conn, ['/v1/operator/autopilot/health'], options, custom_params) JSON.parse(ret.body) end