Class: Datadog::DataStreams::Transport::HTTP::Stats::API::Spec

Inherits:
Core::Transport::HTTP::API::Spec show all
Defined in:
lib/datadog/data_streams/transport/http/stats.rb

Overview

HTTP API Spec for DSM

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Transport::HTTP::API::Spec

#initialize

Constructor Details

This class inherits a constructor from Datadog::Core::Transport::HTTP::API::Spec

Instance Attribute Details

#statsObject

Returns the value of attribute stats.



28
29
30
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 28

def stats
  @stats
end

Instance Method Details

#encoderObject



36
37
38
39
40
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 36

def encoder
  # DSM handles encoding in the transport layer (MessagePack + gzip)
  # so we don't need an encoder at the API level
  nil
end

#send_stats(env, &block) ⇒ Object



30
31
32
33
34
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 30

def send_stats(env, &block)
  raise Core::Transport::HTTP::API::Spec::EndpointNotDefinedError.new('stats', self) if stats.nil?

  stats.call(env, &block)
end