Skip to content

Commit

Permalink
集群-临时
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Mar 8, 2018
1 parent 9e7677b commit eed9f06
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Core/Component/Cluster/Communicate/Detector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function run(Process $process)
}
//广播自身节点
$command = new CommandBean();
$command->setCommand('nodeBroadcast');
$command->setCommand(SysCommand::NODE_BROADCAST);
$command->setArgs($conf->toArray());
Publisher::broadcast($command);
});
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Component/Cluster/Communicate/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
namespace EasySwoole\Core\Component\Cluster\Communicate;


use EasySwoole\Core\Component\Cluster\Common\NodeBean;
use EasySwoole\Core\Component\Cluster\Config;
use EasySwoole\Core\Component\Cluster\NetWork\Udp;
use EasySwoole\Core\Component\Cluster\Server\NodeBean;
use EasySwoole\Core\Component\Trigger;

class Publisher
Expand Down
16 changes: 16 additions & 0 deletions src/Core/Component/Cluster/Communicate/SysCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Created by PhpStorm.
* User: yf
* Date: 2018/3/8
* Time: 下午12:06
*/

namespace EasySwoole\Core\Component\Cluster\Communicate;


class SysCommand
{
const NODE_BROADCAST = 'NODE_BROADCAST';
const NODE_SHUTDOWN = 'NODE_SHUTDOWN';
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/**
* Created by PhpStorm.
* User: yf
* Date: 2018/2/8
* Time: 下午4:05
* Date: 2018/3/8
* Time: 下午12:03
*/

namespace EasySwoole\Core\Component\Cluster\Common;
namespace EasySwoole\Core\Component\Cluster\Server;


use EasySwoole\Core\Component\Spl\SplBean;
Expand Down
17 changes: 17 additions & 0 deletions src/Core/Component/Cluster/Server/ServerManager.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Created by PhpStorm.
* User: yf
* Date: 2018/3/8
* Time: 下午12:00
*/

namespace EasySwoole\Core\Component\Cluster\Server;


use EasySwoole\Core\AbstractInterface\Singleton;

class ServerManager
{
use Singleton;
}

0 comments on commit eed9f06

Please sign in to comment.