Skip to content

Commit

Permalink
chore: add retry interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gowrizrh committed Feb 13, 2024
1 parent 1fa940a commit 66f149e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Api/Data/ResultInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace MageOS\AsyncEvents\Api\Data;

interface ResultInterface
{
public function getIsSuccessful(): bool;

public function setIsSuccessful(bool $isSuccessful): void;

public function getIsRetryable(): bool;

public function setIsRetryable(bool $isRetryable): void;

public function getRetryAfter(): int;

public function setRetryAfter(int $retryAfter): void;

public function isSuccessful(): bool;

public function isRetryable(): bool;
}
12 changes: 12 additions & 0 deletions Api/RetryManagementInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace MageOS\AsyncEvents\Api;

interface RetryManagementInterface
{
public function init(int $subscriptionId, mixed $data, string $uuid): void;

public function place(int $deathCount, int $subscriptionId, mixed $data, string $uuid, int $backoff = 0): void;

public function kill(int $subscriptionId, mixed $data): void;
}

0 comments on commit 66f149e

Please sign in to comment.