Class: Datadog::Core::Transport::HTTP::API::Endpoint
- Inherits:
-
Object
- Object
- Datadog::Core::Transport::HTTP::API::Endpoint
- Defined in:
- lib/datadog/core/transport/http/api/endpoint.rb
Overview
Endpoint
Direct Known Subclasses
Remote::Transport::HTTP::Config::API::Endpoint, Remote::Transport::HTTP::Negotiation::API::Endpoint, Datadog::Core::Telemetry::Transport::HTTP::Telemetry::API::Endpoint, DI::Transport::HTTP::Diagnostics::API::Endpoint, DI::Transport::HTTP::Input::API::Endpoint, DataStreams::Transport::HTTP::Stats::API::Endpoint, Tracing::Transport::HTTP::Traces::API::Endpoint
Instance Attribute Summary collapse
-
#encoder ⇒ Object
readonly
TODO Currently only Traces transport specifies an encoder.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
- #call(env) {|env| ... } ⇒ Object
-
#initialize(verb, path, encoder: nil) ⇒ Endpoint
constructor
A new instance of Endpoint.
Constructor Details
#initialize(verb, path, encoder: nil) ⇒ Endpoint
Returns a new instance of Endpoint.
20 21 22 23 24 |
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 20 def initialize(verb, path, encoder: nil) @verb = verb @path = path @encoder = encoder end |
Instance Attribute Details
#encoder ⇒ Object (readonly)
TODO Currently only Traces transport specifies an encoder. Other transports perform encoding “inline” / ad-hoc. They should probably use this encoder field instead.
18 19 20 |
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 18 def encoder @encoder end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
13 14 15 |
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 13 def path @path end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
12 13 14 |
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 12 def verb @verb end |
Instance Method Details
#call(env) {|env| ... } ⇒ Object
26 27 28 29 30 |
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 26 def call(env) env.verb = verb env.path = path yield(env) end |