Class: Datadog::Core::Transport::Config::Transport
- Inherits:
-
Object
- Object
- Datadog::Core::Transport::Config::Transport
- Defined in:
- lib/datadog/core/transport/config.rb
Overview
Config 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_config(payload) ⇒ Object
there is only one transport! it’s negotiation!.
Constructor Details
Instance Attribute Details
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
34 35 36 |
# File 'lib/datadog/core/transport/config.rb', line 34 def apis @apis end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
34 35 36 |
# File 'lib/datadog/core/transport/config.rb', line 34 def client @client end |
#current_api_id ⇒ Object (readonly)
Returns the value of attribute current_api_id.
34 35 36 |
# File 'lib/datadog/core/transport/config.rb', line 34 def current_api_id @current_api_id end |
#default_api ⇒ Object (readonly)
Returns the value of attribute default_api.
34 35 36 |
# File 'lib/datadog/core/transport/config.rb', line 34 def default_api @default_api end |
Instance Method Details
#current_api ⇒ Object
51 52 53 |
# File 'lib/datadog/core/transport/config.rb', line 51 def current_api @apis[HTTP::API::V7] end |
#send_config(payload) ⇒ Object
there is only one transport! it’s negotiation!
43 44 45 46 47 48 49 |
# File 'lib/datadog/core/transport/config.rb', line 43 def send_config(payload) json = JSON.dump(payload) parcel = EncodedParcel.new(json) request = Request.new(parcel) @client.send_config_payload(request) end |