2017 © Pedro Peláez
 

library registry-provider

image

fastd/registry-provider

  • Friday, July 13, 2018
  • by JanHuang
  • Repository
  • 2 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

sentinel

FastD sentinel, (*1)

说明

仅支持php-cli, (*2)

配置FastD sentinel

  • 添加配置

在config/config.php添加配置registry, (*3)

<?php

return [
    'registry' => qconf_get_values('/zookeeper path', null, null, [
        'host' => 'tcp://registry host',
        //连接重试间隔,时间单位ms
        'retry_interval' => 1000,
    ]),
];

host 为发现服务器接受数据的地址,由 fastd-register 启动 swoole server 时决定,可以根据启动的ip跟端口进行调整。, (*4)

  • 注册

在config/process.php添加配置, (*5)

```php <?php, (*6)

return [ 'sentinel' => [ 'process' => \FastD\RegistryProvider\Process\RegisterProcess::class, 'options' => [, (*7)

     ],
 ],

]; ```, (*8)

在FPM的模式下,可以通过: php bin/process sentinel start 命令进行启动, (*9)

如果在swoole模式下,则需要在 server.php 文件中添加进程:, (*10)

<?php

return [
    // some code
    'processes' => [
        \FastD\RegistryProvider\Process\RegisterProcess::class,
    ],
    // some code
];

The Versions

13/07 2018

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires