Class: ElasticAPM::Transport::Connection::ProxyPipe Private
- Inherits:
-
Object
- Object
- ElasticAPM::Transport::Connection::ProxyPipe
- Defined in:
- lib/elastic_apm/transport/connection/proxy_pipe.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Write
Instance Attribute Summary collapse
- #read ⇒ Object readonly private
- #write ⇒ Object readonly private
Class Method Summary collapse
- .pipe(**args) ⇒ Object private
Instance Method Summary collapse
-
#initialize(enc = nil, compress: true) ⇒ ProxyPipe
constructor
private
A new instance of ProxyPipe.
Constructor Details
#initialize(enc = nil, compress: true) ⇒ ProxyPipe
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.
Returns a new instance of ProxyPipe.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/elastic_apm/transport/connection/proxy_pipe.rb', line 25 def initialize(enc = nil, compress: true) rd, wr = IO.pipe(enc) @read = rd @write = Write.new(wr, compress: compress) # Http.rb<4 calls rewind on the request bodies, but IO::Pipe raises # ~mikker return if HTTP::VERSION.to_i >= 4 def rd.rewind; end end |
Instance Attribute Details
#read ⇒ Object (readonly)
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.
37 38 39 |
# File 'lib/elastic_apm/transport/connection/proxy_pipe.rb', line 37 def read @read end |
#write ⇒ Object (readonly)
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.
37 38 39 |
# File 'lib/elastic_apm/transport/connection/proxy_pipe.rb', line 37 def write @write end |
Class Method Details
.pipe(**args) ⇒ 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.
86 87 88 89 |
# File 'lib/elastic_apm/transport/connection/proxy_pipe.rb', line 86 def self.pipe(**args) pipe = new(**args) [pipe.read, pipe.write] end |