承接 shyevsa/yii2-redis-sentinel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shyevsa/yii2-redis-sentinel

最新稳定版本:v0.1.2

Composer 安装命令:

composer require shyevsa/yii2-redis-sentinel

包简介

Yii2 Redis Connection with auto resolve redis `host` and `port` master from redis-sentinel

README 文档

README

This is an extention of yiisoft/yii2-redis to use Sentinel as Source of Connection parameter.

Based on pyurin/yii2-redis-ha. It only work on sentinel, and unable to connect to redis host without sentinel.

Instalation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist shyevsa/yii2-redis-sentinel:"*"

or add

"shyevsa/yii2-redis-sentinel":"*"

to the require section of your composer.json.

Usage

'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,
            ],        
        ],        
    ]
]

The sentinels use the same connection parameter as regular redis connection check yiisoft/yii2-redis for detail

统计信息

  • 总下载量: 11.26k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-05-08