Class: Balancir::Connector
- Inherits:
-
Object
- Object
- Balancir::Connector
- Defined in:
- lib/balancir/connector.rb
Overview
Represents a connection to a particular server
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#random ⇒ Object
Returns the value of attribute random.
-
#recent_errors ⇒ Object
Returns the value of attribute recent_errors.
Instance Method Summary collapse
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
4 5 6 |
# File 'lib/balancir/connector.rb', line 4 def connection @connection end |
#random ⇒ Object
Returns the value of attribute random.
4 5 6 |
# File 'lib/balancir/connector.rb', line 4 def random @random end |
#recent_errors ⇒ Object
Returns the value of attribute recent_errors.
4 5 6 |
# File 'lib/balancir/connector.rb', line 4 def recent_errors @recent_errors end |
Instance Method Details
#clear_errors ⇒ Object
6 7 8 |
# File 'lib/balancir/connector.rb', line 6 def clear_errors @recent_errors = [] end |
#record_error ⇒ Object
10 11 12 |
# File 'lib/balancir/connector.rb', line 10 def record_error @recent_errors << true end |