HttpClientPool.php 615 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. namespace Http\Client\Common;
  4. use Http\Client\Common\HttpClientPool\HttpClientPoolItem;
  5. use Http\Client\HttpAsyncClient;
  6. use Http\Client\HttpClient;
  7. use Psr\Http\Client\ClientInterface;
  8. /**
  9. * A http client pool allows to send requests on a pool of different http client using a specific strategy (least used,
  10. * round robin, ...).
  11. */
  12. interface HttpClientPool extends HttpAsyncClient, HttpClient
  13. {
  14. /**
  15. * Add a client to the pool.
  16. *
  17. * @param ClientInterface|HttpAsyncClient|HttpClientPoolItem $client
  18. */
  19. public function addHttpClient($client): void;
  20. }