Module: Cellect::Client
- Defined in:
- lib/cellect/client.rb,
lib/cellect/testing.rb,
lib/cellect/client/railtie.rb,
lib/cellect/client/node_set.rb,
lib/cellect/client/connection.rb
Defined Under Namespace
Classes: CellectRailtie, ConfigurationError, Connection, NodeSet
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
._node_set ⇒ Object
Returns the value of attribute _node_set.
9
10
11
|
# File 'lib/cellect/client.rb', line 9
def _node_set
@_node_set
end
|
.connection ⇒ Object
Returns the value of attribute connection.
9
10
11
|
# File 'lib/cellect/client.rb', line 9
def connection
@connection
end
|
Class Method Details
.choose_host ⇒ Object
21
22
23
|
# File 'lib/cellect/client.rb', line 21
def self.choose_host
node_set.nodes.values.sample
end
|
.mock_zookeeper? ⇒ Boolean
3
4
5
|
# File 'lib/cellect/testing.rb', line 3
def self.mock_zookeeper?
true
end
|
.node_set(zk_url = nil) ⇒ Object
12
13
14
15
|
# File 'lib/cellect/client.rb', line 12
def self.node_set(zk_url=nil)
self._node_set ||= NodeSet.supervise(zk_url)
_node_set.actors.first
end
|
.ready? ⇒ Boolean
17
18
19
|
# File 'lib/cellect/client.rb', line 17
def self.ready?
node_set.ready?
end
|