Module: RedisQueuedLocks::Swarm::RedisClientBuilder Private
- Defined in:
- lib/redis_queued_locks/swarm/redis_client_builder.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.build(pooled: false, sentinel: false, config: {}, pool_config: {}) ⇒ RedisClient|RedisClient::Pooled
private
rubocop:disable Style/RedundantAssignment.
Class Method Details
.build(pooled: false, sentinel: false, config: {}, pool_config: {}) ⇒ RedisClient|RedisClient::Pooled
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
rubocop:disable Style/RedundantAssignment
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/redis_queued_locks/swarm/redis_client_builder.rb', line 15 def build(pooled: false, sentinel: false, config: {}, pool_config: {}) config.transform_keys!(&:to_sym) pool_config.transform_keys!(&:to_sym) redis_config = sentinel ? sentinel_config(config) : non_sentinel_config(config) redis_client = pooled ? pooled_client(redis_config, pool_config) : non_pooled_client(redis_config) redis_client end |