Class: Datadog::Statsd::UDSConnection
- Inherits:
-
Connection
- Object
- Connection
- Datadog::Statsd::UDSConnection
- Defined in:
- lib/datadog/statsd/uds_connection.rb
Defined Under Namespace
Classes: BadSocketError
Instance Attribute Summary collapse
-
#socket_path ⇒ Object
readonly
DogStatsd unix socket path.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(socket_path, **kwargs) ⇒ UDSConnection
constructor
A new instance of UDSConnection.
Methods inherited from Connection
Constructor Details
#initialize(socket_path, **kwargs) ⇒ UDSConnection
Returns a new instance of UDSConnection.
13 14 15 16 17 18 |
# File 'lib/datadog/statsd/uds_connection.rb', line 13 def initialize(socket_path, **kwargs) super(**kwargs) @socket_path = socket_path @socket = nil end |
Instance Attribute Details
#socket_path ⇒ Object (readonly)
DogStatsd unix socket path
11 12 13 |
# File 'lib/datadog/statsd/uds_connection.rb', line 11 def socket_path @socket_path end |
Instance Method Details
#close ⇒ Object
20 21 22 23 |
# File 'lib/datadog/statsd/uds_connection.rb', line 20 def close @socket.close if @socket @socket = nil end |