Refactored subscribers to own namespace
This commit is contained in:
parent
952b13535d
commit
17c683d9e8
@ -40,9 +40,6 @@ Take a look at `src/Daemon.php` and `src/Http/Server.php` depending on how much
|
|||||||
|
|
||||||
* [ ] WebSocket distributor
|
* [ ] WebSocket distributor
|
||||||
* [ ] WebSocket authentication
|
* [ ] WebSocket authentication
|
||||||
* [x] Setup subscriptions
|
|
||||||
* [x] Dynamic subscriptions
|
|
||||||
* [x] Distribute events over WS
|
|
||||||
* [ ] HTTP middleware unittests
|
* [ ] HTTP middleware unittests
|
||||||
* [ ] Replay missed events based on event id
|
* [ ] Replay missed events based on event id
|
||||||
* [ ] Metrics endpoint
|
* [ ] Metrics endpoint
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker\Subscriber;
|
||||||
|
|
||||||
|
use NoccyLabs\Mercureact\Broker\Message;
|
||||||
use NoccyLabs\SimpleJWT\JWTToken;
|
use NoccyLabs\SimpleJWT\JWTToken;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use React\Stream\WritableStreamInterface;
|
use React\Stream\WritableStreamInterface;
|
@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker\Subscriber;
|
||||||
|
|
||||||
|
use NoccyLabs\Mercureact\Broker\Message;
|
||||||
|
|
||||||
interface SubscriberInterface
|
interface SubscriberInterface
|
||||||
{
|
{
|
@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker\Subscriber;
|
||||||
|
|
||||||
use Evenement\EventEmitterInterface;
|
use Evenement\EventEmitterInterface;
|
||||||
use Evenement\EventEmitterTrait;
|
use Evenement\EventEmitterTrait;
|
||||||
|
use NoccyLabs\Mercureact\Broker\Message;
|
||||||
|
use NoccyLabs\Mercureact\Broker\TopicManager;
|
||||||
use NoccyLabs\React\WebSocket\WebSocketConnection;
|
use NoccyLabs\React\WebSocket\WebSocketConnection;
|
||||||
use NoccyLabs\SimpleJWT\JWTToken;
|
use NoccyLabs\SimpleJWT\JWTToken;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker;
|
||||||
|
|
||||||
|
use NoccyLabs\Mercureact\Broker\Subscriber\SubscriberInterface;
|
||||||
use SplObjectStorage;
|
use SplObjectStorage;
|
||||||
|
|
||||||
class Topic
|
class Topic
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker;
|
||||||
|
|
||||||
|
use NoccyLabs\Mercureact\Broker\Subscriber\SubscriberInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use SplObjectStorage;
|
use SplObjectStorage;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace NoccyLabs\Mercureact\Http\Middleware;
|
namespace NoccyLabs\Mercureact\Http\Middleware;
|
||||||
|
|
||||||
use NoccyLabs\Mercureact\Broker\Message;
|
use NoccyLabs\Mercureact\Broker\Message;
|
||||||
use NoccyLabs\Mercureact\Broker\SseSubscriber;
|
use NoccyLabs\Mercureact\Broker\Subscriber\SseSubscriber;
|
||||||
use NoccyLabs\Mercureact\Broker\TopicManager;
|
use NoccyLabs\Mercureact\Broker\TopicManager;
|
||||||
use NoccyLabs\Mercureact\Configuration;
|
use NoccyLabs\Mercureact\Configuration;
|
||||||
use NoccyLabs\Mercureact\Exception\RequestException;
|
use NoccyLabs\Mercureact\Exception\RequestException;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace NoccyLabs\Mercureact\Http\Middleware;
|
namespace NoccyLabs\Mercureact\Http\Middleware;
|
||||||
|
|
||||||
use NoccyLabs\Mercureact\Broker\TopicManager;
|
use NoccyLabs\Mercureact\Broker\TopicManager;
|
||||||
use NoccyLabs\Mercureact\Broker\WsSubscriber;
|
use NoccyLabs\Mercureact\Broker\Subscriber\WsSubscriber;
|
||||||
use NoccyLabs\Mercureact\Configuration;
|
use NoccyLabs\Mercureact\Configuration;
|
||||||
use NoccyLabs\React\WebSocket\WebSocketConnection;
|
use NoccyLabs\React\WebSocket\WebSocketConnection;
|
||||||
use NoccyLabs\React\WebSocket\WebSocketMiddleware;
|
use NoccyLabs\React\WebSocket\WebSocketMiddleware;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace NoccyLabs\Mercureact\Broker;
|
namespace NoccyLabs\Mercureact\Broker;
|
||||||
|
|
||||||
|
use NoccyLabs\Mercureact\Broker\Subscriber\SubscriberInterface;
|
||||||
use PHPUnit\Framework\Attributes\CoversClass;
|
use PHPUnit\Framework\Attributes\CoversClass;
|
||||||
|
|
||||||
#[CoversClass(Topic::class)]
|
#[CoversClass(Topic::class)]
|
||||||
|
Loading…
Reference in New Issue
Block a user