Module: Scales::Server::Proxy::Callbacks
Instance Method Summary collapse
- #on_connect ⇒ Object
- #on_data ⇒ Object
- #on_finish ⇒ Object
- #on_response ⇒ Object
- #on_select ⇒ Object
Instance Method Details
#on_connect ⇒ Object
8 9 |
# File 'lib/scales-server/proxy/callbacks.rb', line 8 def on_connect end |
#on_data ⇒ Object
11 12 13 |
# File 'lib/scales-server/proxy/callbacks.rb', line 11 def on_data lambda { |data| data } end |
#on_finish ⇒ Object
23 24 25 |
# File 'lib/scales-server/proxy/callbacks.rb', line 23 def on_finish lambda { |backend| backend.decrement_counter if Backend.strategy == :balanced } end |
#on_response ⇒ Object
15 16 17 |
# File 'lib/scales-server/proxy/callbacks.rb', line 15 def on_response lambda { |backend, response| response } end |