Class: Haplocheirus::Service
- Inherits:
-
ThriftClient
- Object
- ThriftClient
- Haplocheirus::Service
- Defined in:
- lib/haplocheirus/service.rb
Defined Under Namespace
Classes: ServiceDisabled
Constant Summary collapse
- DEFAULTS =
{ :transport_wrapper => Thrift::FramedTransport, :exception_classes => [ IOError, Thrift::TransportException, Thrift::ProtocolException, Thrift::ApplicationException ] }
Instance Method Summary collapse
-
#initialize(servers = nil, options = {}) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(servers = nil, options = {}) ⇒ Service
Returns a new instance of Service.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/haplocheirus/service.rb', line 12 def initialize(servers = nil, = {}) raise ServiceDisabled if .key?(:enabled) && ![:enabled] if servers.nil? || servers.empty? servers = ['127.0.0.1:7666'] else server = Array(servers) end super(Haplocheirus::TimelineStore::Client, servers, DEFAULTS.merge()) end |