Class: Datadog::Core::Remote::Transport::Negotiation::Transport
- Inherits:
-
Object
- Object
- Datadog::Core::Remote::Transport::Negotiation::Transport
- Defined in:
- lib/datadog/core/remote/transport/negotiation.rb
Overview
Negotiation transport
Instance Attribute Summary collapse
-
#apis ⇒ Object
readonly
Returns the value of attribute apis.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#current_api_id ⇒ Object
readonly
Returns the value of attribute current_api_id.
-
#default_api ⇒ Object
readonly
Returns the value of attribute default_api.
Instance Method Summary collapse
- #current_api ⇒ Object
-
#initialize(apis, default_api) ⇒ Transport
constructor
A new instance of Transport.
- #send_info ⇒ Object
Constructor Details
#initialize(apis, default_api) ⇒ Transport
Returns a new instance of Transport.
42 43 44 45 46 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 42 def initialize(apis, default_api) @apis = apis @client = HTTP::Client.new(current_api) end |
Instance Attribute Details
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
40 41 42 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 40 def apis @apis end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
40 41 42 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 40 def client @client end |
#current_api_id ⇒ Object (readonly)
Returns the value of attribute current_api_id.
40 41 42 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 40 def current_api_id @current_api_id end |
#default_api ⇒ Object (readonly)
Returns the value of attribute default_api.
40 41 42 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 40 def default_api @default_api end |
Instance Method Details
#current_api ⇒ Object
54 55 56 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 54 def current_api @apis[HTTP::API::ROOT] end |
#send_info ⇒ Object
48 49 50 51 52 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 48 def send_info request = Request.new @client.send_info_payload(request) end |