fsth/beanstalkd-cluster
Composer 安装命令:
composer require fsth/beanstalkd-cluster
包简介
beanstalkd cluster.
README 文档
README
beanstalkd cluster on client to distribute
usage
$configs = array(
array(
'name' => 'test1',
'tubeNames' => array('tubeName1', 'tubeName2'),
'hosts' => array(
array('host' => '127.0.0.1', 'port' => '11300'),
)
),
array(
'name' => 'test2',
'tubeNames' => array('tubeName3', 'tubeName4'),
'hosts' => array(
array('host' => '127.0.0.1', 'port' => '11301'),
array('host' => '127.0.0.1', 'port' => '11302'),
)
)
);
$proxy = new \FSth\BeanstalkdCluster\Business\Proxy();
$proxy->initWithConfig($configs);
$host = $proxy->lookup('tubeName1'); // return array('host','port') port in ('11300');
$host = $proxy->lookup('tubeName3'); // return array('host','port') port in ('11301', '11302');
统计信息
- 总下载量: 228
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-01