Class: Datadog::CI::Transport::Api::Agentless
- Defined in:
- lib/datadog/ci/transport/api/agentless.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #api_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
- #citestcov_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
- #citestcycle_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
-
#initialize(api_key:, citestcycle_url:, api_url:, citestcov_url:, logs_intake_url:) ⇒ Agentless
constructor
A new instance of Agentless.
- #logs_intake_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(api_key:, citestcycle_url:, api_url:, citestcov_url:, logs_intake_url:) ⇒ Agentless
Returns a new instance of Agentless.
13 14 15 16 17 18 19 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 13 def initialize(api_key:, citestcycle_url:, api_url:, citestcov_url:, logs_intake_url:) @api_key = api_key @citestcycle_http = build_http_client(citestcycle_url, compress: true) @api_http = build_http_client(api_url, compress: false) @citestcov_http = build_http_client(citestcov_url, compress: true) @logs_intake_http = build_http_client(logs_intake_url, compress: true) end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 11 def api_key @api_key end |
Instance Method Details
#api_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 27 def api_request(path:, payload:, headers: {}, verb: "post") super perform_request( @api_http, path: path, payload: payload, headers: headers, verb: verb, accept_compressed_response: true ) end |
#citestcov_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
40 41 42 43 44 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 40 def citestcov_request(path:, payload:, headers: {}, verb: "post") super perform_request(@citestcov_http, path: path, payload: @citestcov_payload, headers: headers, verb: verb) end |
#citestcycle_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
21 22 23 24 25 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 21 def citestcycle_request(path:, payload:, headers: {}, verb: "post") super perform_request(@citestcycle_http, path: path, payload: payload, headers: headers, verb: verb) end |
#logs_intake_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
46 47 48 49 50 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 46 def logs_intake_request(path:, payload:, headers: {}, verb: "post") super perform_request(@logs_intake_http, path: path, payload: payload, headers: headers, verb: verb) end |