Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Healtcheck] Remove tolerance dependency #5

Open
shouze opened this issue Nov 30, 2017 · 0 comments
Open

[Healtcheck] Remove tolerance dependency #5

shouze opened this issue Nov 30, 2017 · 0 comments

Comments

@shouze
Copy link
Member

shouze commented Nov 30, 2017

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:

$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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant