Class: Datadog::Core::Remote::Transport::HTTP::Negotiation::Response

Inherits:
Object
  • Object
show all
Includes:
Negotiation::Response, Transport::HTTP::Response
Defined in:
lib/datadog/core/remote/transport/http/negotiation.rb

Overview

Response from HTTP transport for agent feature negotiation

Instance Attribute Summary

Attributes included from Negotiation::Response

#config, #endpoints, #version

Instance Method Summary collapse

Methods included from Transport::HTTP::Response

#client_error?, #code, #internal_error?, #not_found?, #ok?, #payload, #server_error?, #unsupported?

Constructor Details

#initialize(http_response, options = {}) ⇒ Response

Returns a new instance of Response.



38
39
40
41
42
43
44
45
46
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 38

def initialize(http_response, options = {})
  super(http_response)

  # TODO: transform endpoint hash in a better object for negotiation
  # TODO: transform config in a better object, notably config has max_request_bytes
  @version = options[:version]
  @endpoints = options[:endpoints]
  @config = options[:config]
end