aztech/event-bus-extra-redis
Composer 安装命令:
composer require aztech/event-bus-extra-redis
包简介
aztech/event-bus Redis channel provider
README 文档
README
Build status
Stability
About
Redis database plugin for the aztech/event-bus library. For more information on event-bus, see that library's readme.
Installation
Via Composer
Composer is the only supported way of installing aztech/event-bus-extra-redis . Don't know Composer yet ? Read more about it.
$ composer require "aztech/event-bus-extra-redis":"~1"
Usage
To use this plugin, you first need to register it with the Event factory. The easiest way is as follows :
<?php require_once 'vendor/autoload.php'; use \Aztech\Events\Events; use \Aztech\Events\Bus\Plugins\Redis\Redis; Redis::loadPlugin('redis'); $publisher = Events::createPublisher('redis'); $processor = Events::createProcessor('redis'); // ...
Configuring
By default, the plugin attempts to connect to a Redis server at localhost:6379, which suits mostly development machines.
You can configure the Redis client using the options array when using the Event factory.
<?php require_once 'vendor/autoload.php'; use \Aztech\Events\Events; use \Aztech\Events\Bus\Plugins\Redis\Redis; Redis::loadPlugin('redis'); $publisher = Events::createPublisher('redis', [ 'host' => '192.168.1.1', 'port' => 6379); // ...
The keenest readers will have noticed the options accepted are the same as those used by \Predis\Client.
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-08-28