Class: LoadBalancedRestClient
- Inherits:
-
Object
- Object
- LoadBalancedRestClient
- Includes:
- RestClientProxy
- Defined in:
- lib/server.rb,
lib/cluster.rb,
lib/version.rb,
lib/load_balancer.rb,
lib/rest_client_proxy.rb,
lib/load_balanced_rest_client.rb,
lib/algorithms/linear_downtime.rb,
lib/algorithms/exponential_downtime.rb
Defined Under Namespace
Modules: Algorithms, RestClientProxy Classes: Cluster, LoadBalancer, RestClientProxyCall, Server
Constant Summary collapse
- VERSION =
"1.0.2"
Instance Attribute Summary collapse
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#load_balancer ⇒ Object
Returns the value of attribute load_balancer.
Instance Method Summary collapse
-
#initialize(servers, opts = {}) ⇒ LoadBalancedRestClient
constructor
A new instance of LoadBalancedRestClient.
Methods included from RestClientProxy
Constructor Details
#initialize(servers, opts = {}) ⇒ LoadBalancedRestClient
Returns a new instance of LoadBalancedRestClient.
14 15 16 17 |
# File 'lib/load_balanced_rest_client.rb', line 14 def initialize(servers, opts={}) @cluster = Cluster.new(servers, opts) @load_balancer = LoadBalancer.new(@cluster, opts) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class LoadBalancedRestClient::RestClientProxy
Instance Attribute Details
#cluster ⇒ Object
Returns the value of attribute cluster.
11 12 13 |
# File 'lib/load_balanced_rest_client.rb', line 11 def cluster @cluster end |
#load_balancer ⇒ Object
Returns the value of attribute load_balancer.
11 12 13 |
# File 'lib/load_balanced_rest_client.rb', line 11 def load_balancer @load_balancer end |