services:
    oro.redis_config.setup_factory:
        public: true
        class: Oro\Bundle\RedisConfigBundle\Service\SetupFactory
        arguments:
            - '@oro.redis_config.setup.sentinel'
            - '@oro.redis_config.setup.cluster'
            - '@oro.redis_config.setup.standalone'

    oro.redis_config.setup.sentinel:
        class: Oro\Bundle\RedisConfigBundle\Service\Setup\SentinelSetup
        calls:
            - ['setContainer', ['@service_container']]

    oro.redis_config.setup.cluster:
        class: Oro\Bundle\RedisConfigBundle\Service\Setup\ClusterSetup
        calls:
            - ['setContainer', ['@service_container']]

    oro.redis_config.setup.standalone:
        class: Oro\Bundle\RedisConfigBundle\Service\Setup\StandaloneSetup
        calls:
            - ['setContainer', ['@service_container']]

    oro.redis_config.ip_address_provider:
        class: Oro\Bundle\RedisConfigBundle\Configuration\IpAddressProvider
        arguments:
            - "@=container.hasParameter('server_ip_address') ? parameter('server_ip_address') : null"

    oro.redis_config.client_locator:
        class: Symfony\Component\DependencyInjection\ServiceLocator
        public: true
        arguments:
            -
                snc_redis.cache: '@?snc_redis.cache'
                snc_redis.doctrine: '@?snc_redis.doctrine'
                snc_redis.session: '@?snc_redis.session'
        tags: ['container.service_locator']
