-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Actual TcpHealthcheck constructor is made like that:
public function __construct(float $initialExponent, float $step, float $maxExecutionTime, LoggerInterface $logger = null) |
... and later on we build from the inside this kind of retry operation by using Tolerance:
ubirak-php/src/Component/Healthcheck/TcpHealthcheck.php
Lines 55 to 62 in e22ac41
$runner = new RetryOperationRunner( | |
new CallbackOperationRunner(), | |
new ExponentialBackOff( | |
new Timeout(new SleepWaiter(), $this->maxExecutionTime), | |
$this->initialExponent, | |
$this->step | |
) | |
); |
Would be great to have that Tolerance part:
- optional we can want to make a single healthcheck
- external to this TcpHealthcheck class... thus removing Tolerance requirement in composer.json
That said... the best way probably is to inject a TcpClient that will be able to be decorated at will by some Tolerance operation.
WDYT @ubirak/core?