Module: Bones::RPC::Failover
- Extended by:
- Failover
- Included in:
- Failover
- Defined in:
- lib/bones/rpc/failover.rb,
lib/bones/rpc/failover/retry.rb,
lib/bones/rpc/failover/ignore.rb,
lib/bones/rpc/failover/disconnect.rb
Overview
Provides behaviour around failover scenarios for different types of exceptions that get raised on connection and execution of operations.
Defined Under Namespace
Modules: Disconnect, Ignore, Retry
Constant Summary collapse
- STRATEGIES =
Hash lookup for the failover classes based off the exception type.
{ Errors::ConnectionFailure => Retry }.freeze
Instance Method Summary collapse
-
#get(exception) ⇒ Object
Get the appropriate failover handler given the provided exception.
Instance Method Details
#get(exception) ⇒ Object
Get the appropriate failover handler given the provided exception.
33 34 35 |
# File 'lib/bones/rpc/failover.rb', line 33 def get(exception) STRATEGIES.fetch(exception.class, Disconnect) end |