Module: CitrusRpc::RpcClient::Router
- Included in:
- Client
- Defined in:
- lib/citrus-rpc/rpc-client/router.rb
Overview
Router
Instance Method Summary collapse
-
#ch_route(client, server_type, msg, &block) ⇒ Object
Consistent-Hash algorithm for calculating server id.
-
#df_route(session, msg, context, &block) ⇒ Object
Calculate route info and return an appropriate server id.
-
#la_route(client, server_type, msg, &block) ⇒ Object
Least-Active algorithm for calculating server id.
-
#rd_route(client, server_type, msg, &block) ⇒ Object
Random algorithm for calculating server id.
-
#rr_route(client, server_type, msg, &block) ⇒ Object
Round-Robin algorithm for calculating server id.
-
#wrr_route(client, server_type, msg, &block) ⇒ Object
Weight-Round-Robin algorithm for calculating server id.
Instance Method Details
#ch_route(client, server_type, msg, &block) ⇒ Object
Consistent-Hash algorithm for calculating server id
59 60 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 59 def ch_route client, server_type, msg, &block end |
#df_route(session, msg, context, &block) ⇒ Object
Calculate route info and return an appropriate server id
19 20 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 19 def df_route session, msg, context, &block end |
#la_route(client, server_type, msg, &block) ⇒ Object
Least-Active algorithm for calculating server id
51 52 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 51 def la_route client, server_type, msg, &block end |
#rd_route(client, server_type, msg, &block) ⇒ Object
Random algorithm for calculating server id
27 28 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 27 def rd_route client, server_type, msg, &block end |
#rr_route(client, server_type, msg, &block) ⇒ Object
Round-Robin algorithm for calculating server id
35 36 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 35 def rr_route client, server_type, msg, &block end |
#wrr_route(client, server_type, msg, &block) ⇒ Object
Weight-Round-Robin algorithm for calculating server id
43 44 |
# File 'lib/citrus-rpc/rpc-client/router.rb', line 43 def wrr_route client, server_type, msg, &block end |