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

Inherits:
Object
  • Object
show all
Includes:
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 collapse

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



20
21
22
23
24
25
26
27
28
29
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 20

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]
  @span_events = options[:span_events]
end

Instance Attribute Details

#configHash (readonly)

The agent configuration. These are configured by the user when starting the agent, as well as any defaults.



43
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 43

attr_reader :version, :endpoints, :config, :span_events

#endpointsArray<String> (readonly)

The HTTP endpoints the agent supports.



43
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 43

attr_reader :version, :endpoints, :config, :span_events

#span_eventsObject (readonly)

Returns the value of attribute span_events.



43
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 43

attr_reader :version, :endpoints, :config, :span_events

#versionString (readonly)

The version of the agent.



43
44
45
# File 'lib/datadog/core/remote/transport/http/negotiation.rb', line 43

def version
  @version
end