File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ### Added
4+
5+ - ` Innmind\OperatingSystem\Config\Resilient::withHttpRetries() `
6+
37## 7.0.0 - 2026-02-07
48
59### Added
Original file line number Diff line number Diff line change 55
66use Innmind \OperatingSystem \Config ;
77use Innmind \HttpTransport \Transport ;
8+ use Innmind \Time \Period ;
9+ use Innmind \Immutable \Sequence ;
810
911/**
1012 * @psalm-immutable
1113 */
12- enum Resilient
14+ final class Resilient
1315{
14- case instance;
16+ /**
17+ * @param ?Sequence<Period> $retries
18+ */
19+ private function __construct (
20+ private ?Sequence $ retries ,
21+ ) {
22+ }
1523
1624 #[\NoDiscard]
1725 public function __invoke (Config $ config ): Config
@@ -31,6 +39,15 @@ public function __invoke(Config $config): Config
3139 #[\NoDiscard]
3240 public static function new (): self
3341 {
34- return self ::instance;
42+ return new self (null );
43+ }
44+
45+ /**
46+ * @param Sequence<Period> $retries
47+ */
48+ #[\NoDiscard]
49+ public function withHttpRetries (Sequence $ retries ): self
50+ {
51+ return new self ($ retries );
3552 }
3653}
You can’t perform that action at this time.
0 commit comments