Skip to content

Commit

Permalink
Merge 96b8381 into eb70613
Browse files Browse the repository at this point in the history
  • Loading branch information
prolic committed Jan 25, 2019
2 parents eb70613 + 96b8381 commit 11e8a33
Show file tree
Hide file tree
Showing 28 changed files with 443 additions and 87 deletions.
Expand Up @@ -11,14 +11,15 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

use Prooph\EventStore\SubscriptionDropReason;
use Throwable;

interface AsyncCatchUpSubscriptionDropped
interface CatchUpSubscriptionDropped
{
public function __invoke(
AsyncEventStoreCatchUpSubscription $subscription,
EventStoreCatchUpSubscription $subscription,
SubscriptionDropReason $reason,
?Throwable $exception = null
): void;
Expand Down
40 changes: 40 additions & 0 deletions src/Async/ClientAuthenticationFailedEventArgs.php
@@ -0,0 +1,40 @@
<?php

/**
* This file is part of prooph/event-store.
* (c) 2014-2019 prooph software GmbH <contact@prooph.de>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\EventStore\Async;

use Prooph\EventStore\EventArgs;

class ClientAuthenticationFailedEventArgs implements EventArgs
{
/** @var EventStoreConnection */
private $connection;
/** @var string */
private $reason;

public function __construct(EventStoreConnection $connection, string $reason)
{
$this->connection = $connection;
$this->reason = $reason;
}

public function connection(): EventStoreConnection
{
return $this->connection;
}

public function reason(): string
{
return $this->reason;
}
}
40 changes: 40 additions & 0 deletions src/Async/ClientClosedEventArgs.php
@@ -0,0 +1,40 @@
<?php

/**
* This file is part of prooph/event-store.
* (c) 2014-2019 prooph software GmbH <contact@prooph.de>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\EventStore\Async;

use Prooph\EventStore\EventArgs;

class ClientClosedEventArgs implements EventArgs
{
/** @var EventStoreConnection */
private $connection;
/** @var string */
private $reason;

public function __construct(EventStoreConnection $connection, string $reason)
{
$this->connection = $connection;
$this->reason = $reason;
}

public function connection(): EventStoreConnection
{
return $this->connection;
}

public function reason(): string
{
return $this->reason;
}
}
41 changes: 41 additions & 0 deletions src/Async/ClientConnectionEventArgs.php
@@ -0,0 +1,41 @@
<?php

/**
* This file is part of prooph/event-store.
* (c) 2014-2019 prooph software GmbH <contact@prooph.de>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\EventStore\Async;

use Prooph\EventStore\EndPoint;
use Prooph\EventStore\EventArgs;

class ClientConnectionEventArgs implements EventArgs
{
/** @var EventStoreConnection */
private $connection;
/** @var EndPoint */
private $remoteEndPoint;

public function __construct(EventStoreConnection $connection, EndPoint $remoteEndPoint)
{
$this->connection = $connection;
$this->remoteEndPoint = $remoteEndPoint;
}

public function connection(): EventStoreConnection
{
return $this->connection;
}

public function remoteEndPoint(): EndPoint
{
return $this->remoteEndPoint;
}
}
41 changes: 41 additions & 0 deletions src/Async/ClientErrorEventArgs.php
@@ -0,0 +1,41 @@
<?php

/**
* This file is part of prooph/event-store.
* (c) 2014-2019 prooph software GmbH <contact@prooph.de>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\EventStore\Async;

use Prooph\EventStore\EventArgs;
use Throwable;

class ClientErrorEventArgs implements EventArgs
{
/** @var EventStoreConnection */
private $connection;
/** @var Throwable */
private $exception;

public function __construct(EventStoreConnection $connection, Throwable $exception)
{
$this->connection = $connection;
$this->exception = $exception;
}

public function connection(): EventStoreConnection
{
return $this->connection;
}

public function exception(): Throwable
{
return $this->exception;
}
}
32 changes: 32 additions & 0 deletions src/Async/ClientReconnectingEventArgs.php
@@ -0,0 +1,32 @@
<?php

/**
* This file is part of prooph/event-store.
* (c) 2014-2019 prooph software GmbH <contact@prooph.de>
* (c) 2015-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\EventStore\Async;

use Prooph\EventStore\EventArgs;

class ClientReconnectingEventArgs implements EventArgs
{
/** @var EventStoreConnection */
private $connection;

public function __construct(EventStoreConnection $connection)
{
$this->connection = $connection;
}

public function connection(): EventStoreConnection
{
return $this->connection;
}
}
Expand Up @@ -11,14 +11,15 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

use Amp\Promise;
use Prooph\EventStore\ResolvedEvent;

interface EventAppearedOnAsyncCatchupSubscription
interface EventAppearedOnCatchupSubscription
{
public function __invoke(
AsyncEventStoreCatchUpSubscription $subscription,
EventStoreCatchUpSubscription $subscription,
ResolvedEvent $resolvedEvent
): Promise;
}
Expand Up @@ -11,14 +11,15 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

use Amp\Promise;
use Prooph\EventStore\ResolvedEvent;

interface EventAppearedOnAsyncPersistentSubscription
interface EventAppearedOnPersistentSubscription
{
public function __invoke(
AsyncEventStorePersistentSubscription $subscription,
EventStorePersistentSubscription $subscription,
ResolvedEvent $resolvedEvent,
?int $retryCount = null
): Promise;
Expand Down
Expand Up @@ -11,11 +11,13 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

use Amp\Promise;
use Prooph\EventStore\EventStoreSubscription;
use Prooph\EventStore\ResolvedEvent;

interface EventAppearedOnAsyncSubscription
interface EventAppearedOnSubscription
{
public function __invoke(
EventStoreSubscription $subscription,
Expand Down
Expand Up @@ -11,9 +11,12 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

interface AsyncEventStoreAllCatchUpSubscription extends AsyncEventStoreCatchUpSubscription
use Prooph\EventStore\EventStoreCatchUpSubscription;
use Prooph\EventStore\Position;

interface EventStoreAllCatchUpSubscription extends EventStoreCatchUpSubscription
{
public function lastProcessedPosition(): Position;
}
Expand Up @@ -11,12 +11,13 @@

declare(strict_types=1);

namespace Prooph\EventStore;
namespace Prooph\EventStore\Async;

use Amp\Promise;
use Prooph\EventStore\SubscriptionDropReason;
use Throwable;

interface AsyncEventStoreCatchUpSubscription
interface EventStoreCatchUpSubscription
{
public function isSubscribedToAll(): bool;

Expand Down

0 comments on commit 11e8a33

Please sign in to comment.