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.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #current_api ⇒ Object
-
#initialize(apis, default_api, logger: Datadog.logger) ⇒ Transport
constructor
A new instance of Transport.
- #send_info ⇒ Object
Constructor Details
#initialize(apis, default_api, logger: Datadog.logger) ⇒ Transport
Returns a new instance of Transport.
38 39 40 41 42 43 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 38 def initialize(apis, default_api, logger: Datadog.logger) @apis = apis @logger = logger @client = Remote::Transport::HTTP::Negotiation::Client.new(current_api, logger: logger) end |
Instance Attribute Details
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
36 37 38 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 36 def apis @apis end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
36 37 38 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 36 def client @client end |
#current_api_id ⇒ Object (readonly)
Returns the value of attribute current_api_id.
36 37 38 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 36 def current_api_id @current_api_id end |
#default_api ⇒ Object (readonly)
Returns the value of attribute default_api.
36 37 38 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 36 def default_api @default_api end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
36 37 38 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 36 def logger @logger end |
Instance Method Details
#current_api ⇒ Object
51 52 53 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 51 def current_api @apis[HTTP::API::ROOT] end |
#send_info ⇒ Object
45 46 47 48 49 |
# File 'lib/datadog/core/remote/transport/negotiation.rb', line 45 def send_info request = Request.new @client.send_info_payload(request) end |