Sha256: 4d0e2da4924e49eeb1d375b4db436081da8606a18f01cde8e657b9bf1a9b2774
Contents?: true
Size: 1.42 KB
Versions: 24
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true require_relative '../../../core/transport/request' require_relative '../../../core/transport/parcel' module Datadog module Core module Remote module Transport module Config # Data transfer object for encoded traces class EncodedParcel include Datadog::Core::Transport::Parcel def count data.length end end # Config request class Request < Datadog::Core::Transport::Request end # Config response module Response attr_reader :roots, :targets, :target_files, :client_configs def empty? @empty end end # Config transport class Transport attr_reader :client, :apis, :default_api, :current_api_id def initialize(apis, default_api) @apis = apis @client = HTTP::Client.new(current_api) end ##### there is only one transport! it's negotiation! def send_config(payload) json = JSON.dump(payload) parcel = EncodedParcel.new(json) request = Request.new(parcel) @client.send_config_payload(request) end def current_api @apis[HTTP::API::V7] end end end end end end end
Version data entries
24 entries across 24 versions & 2 rubygems