def state(s, options = {})
      custom_params = []
      custom_params << use_named_parameter('dc', options[:dc]) if options[:dc]
      custom_params << use_named_parameter('near', options[:near]) if options[:near]

      ret = send_get_request(@conn, ["/v1/health/state/#{s}"], options, custom_params)
      JSON.parse(ret.body).map { |status| OpenStruct.new status }
    end
def state(s, options = {})
      custom_params = []
      custom_params << use_named_parameter('dc', options[:dc]) if options[:dc]
      custom_params << use_named_parameter('near', options[:near]) if options[:near]

      ret = send_get_request(@conn, ["/v1/health/state/#{s}"], options, custom_params)
      JSON.parse(ret.body).map { |status| OpenStruct.new status }
    end
rubocop:enable PerceivedComplexity
 Get service health
 @param s [String] the state ("any", "passing", "warning", or "critical")
 @param options [Hash] :dc string for dc specific query
 @return [OpenStruct] all data associated with the node