Module: Datadog::DI::Transport::HTTP Private

Defined in:
lib/datadog/di/transport/http.rb,
lib/datadog/di/transport/http/api.rb,
lib/datadog/di/transport/http/input.rb,
lib/datadog/di/transport/http/client.rb,
lib/datadog/di/transport/http/diagnostics.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Namespace for HTTP transport components

Defined Under Namespace

Modules: API, Diagnostics, Input Classes: Client

Class Method Summary collapse

Class Method Details

.diagnostics(agent_settings:, logger:, api_version: nil, headers: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds a new Transport::HTTP::Client with default settings Pass a block to override any settings.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/datadog/di/transport/http.rb', line 17

def diagnostics(
  agent_settings:,
  logger:,
  api_version: nil,
  headers: nil
)
  Core::Transport::HTTP.build(api_instance_class: Diagnostics::API::Instance,
    logger: logger,
    agent_settings: agent_settings, api_version: api_version, headers: headers) do |transport|
    apis = API.defaults

    transport.api API::DIAGNOSTICS, apis[API::DIAGNOSTICS]

    # Call block to apply any customization, if provided
    yield(transport) if block_given?
  end.to_transport(DI::Transport::Diagnostics::Transport)
end

.input(agent_settings:, logger:, api_version: nil, headers: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds a new Transport::HTTP::Client with default settings Pass a block to override any settings.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/datadog/di/transport/http.rb', line 37

def input(
  agent_settings:,
  logger:,
  api_version: nil,
  headers: nil
)
  Core::Transport::HTTP.build(api_instance_class: Input::API::Instance,
    logger: logger,
    agent_settings: agent_settings, api_version: api_version, headers: headers) do |transport|
    apis = API.defaults

    transport.api API::INPUT, apis[API::INPUT]

    # Call block to apply any customization, if provided
    yield(transport) if block_given?
  end.to_transport(DI::Transport::Input::Transport)
end