Module: HAProxy
- Defined in:
- lib/haproxy.rb,
lib/haproxy/version.rb,
lib/haproxy/csv_parser.rb,
lib/haproxy/stats_reader.rb,
lib/haproxy/socket_reader.rb
Defined Under Namespace
Classes: CSVParser, SocketReader, StatsReader
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.read_stats(from) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/haproxy.rb', line 11 def self.read_stats(from) uri = URI.parse(from) if uri.is_a?(URI::Generic) and File.socket?(uri.path) HAProxy::SocketReader.new(uri.path) else raise NotImplementedError, "Currently only sockets are implemented" end end |