PHP code example of shyevsa / yii2-redis-sentinel

1. Go to this page and download the library: Download shyevsa/yii2-redis-sentinel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

shyevsa / yii2-redis-sentinel example snippets


'components'=>[
    'redis' => [
        'class' => \shyevsa\redis\Connection::class,
        'master_name' => 'mymaster',
        'database' => 0
        'sentinels' => [
            '10.10.4.1',
            '10.10.4.2',
            [
              'hostname'=>'127.0.0.1',
              'port'=>3000,
            ],        
        ],        
    ]
]

php composer.phar