Class: RedisRing::MasterRPC::Connection
- Inherits:
-
Object
- Object
- RedisRing::MasterRPC::Connection
- Defined in:
- lib/redis_ring/master_rpc.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#http_client ⇒ Object
readonly
Returns the value of attribute http_client.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(http_client, host, port) ⇒ Connection
constructor
A new instance of Connection.
- #node_loaded(node_id) ⇒ Object
Constructor Details
#initialize(http_client, host, port) ⇒ Connection
Returns a new instance of Connection.
19 20 21 22 23 |
# File 'lib/redis_ring/master_rpc.rb', line 19 def initialize(http_client, host, port) @http_client = http_client @host = host @port = port end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
17 18 19 |
# File 'lib/redis_ring/master_rpc.rb', line 17 def host @host end |
#http_client ⇒ Object (readonly)
Returns the value of attribute http_client.
17 18 19 |
# File 'lib/redis_ring/master_rpc.rb', line 17 def http_client @http_client end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
17 18 19 |
# File 'lib/redis_ring/master_rpc.rb', line 17 def port @port end |
Instance Method Details
#node_loaded(node_id) ⇒ Object
25 26 27 |
# File 'lib/redis_ring/master_rpc.rb', line 25 def node_loaded(node_id) http_client.post(host, port, "/master/node_joined/#{node_id}") end |