Class: Elastictastic::Rotor::Node
- Inherits:
-
Object
- Object
- Elastictastic::Rotor::Node
- Defined in:
- lib/elastictastic/rotor.rb
Instance Method Summary collapse
-
#initialize(connection, options) ⇒ Node
constructor
A new instance of Node.
- #request(method, path, body = nil) ⇒ Object
Constructor Details
#initialize(connection, options) ⇒ Node
Returns a new instance of Node.
48 49 50 51 52 53 54 |
# File 'lib/elastictastic/rotor.rb', line 48 def initialize(connection, ) @connection = connection @failures = 0 @backoff_threshold = [:backoff_threshold] || 0 @backoff_start = [:backoff_start] @backoff_max = [:backoff_max] end |
Instance Method Details
#request(method, path, body = nil) ⇒ Object
56 57 58 |
# File 'lib/elastictastic/rotor.rb', line 56 def request(method, path, body = nil) try_track { @connection.request(method, path, body).tap { succeeded! }} end |