Module: Gauge::Connector Private
- Defined in:
- lib/connector.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- GAUGE_PORT_ENV =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"GAUGE_INTERNAL_PORT"- HOST_NAME =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'127.0.0.1'- @@executionSocket =
This classvariable is part of a private API. You should avoid using this classvariable if possible, as it may be removed or be changed in the future.
nil
Class Method Summary collapse
- .execution_socket ⇒ Object private
- .make_connection ⇒ Object private
- .message_length(socket) ⇒ Object private
- .step_value(text) ⇒ Object private
Class Method Details
.execution_socket ⇒ 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.
29 30 31 |
# File 'lib/connector.rb', line 29 def self.execution_socket @@executionSocket end |
.make_connection ⇒ 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.
33 34 35 36 |
# File 'lib/connector.rb', line 33 def self.make_connection @@executionSocket = TCPSocket.open(HOST_NAME, Runtime.port_from_env_variable(GAUGE_PORT_ENV)) @@executionSocket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) end |
.message_length(socket) ⇒ 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.
38 39 40 |
# File 'lib/connector.rb', line 38 def self.(socket) ProtocolBuffers::Varint.decode socket end |
.step_value(text) ⇒ 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.
42 43 44 |
# File 'lib/connector.rb', line 42 def self.step_value text return text.gsub(/(<.*?>)/, "{}") end |