Documentation

RoundRobinClientPool extends HttpClientPool
in package

FinalYes

RoundRobinClientPool will choose the next client in the pool.

Tags
author

Joel Wurtz joel.wurtz@gmail.com

Table of Contents

Properties

$clientPool  : array<string|int, HttpClientPoolItem>

Methods

addHttpClient()  : void
Add a client to the pool.
sendAsyncRequest()  : Promise
Sends a PSR-7 request in an asynchronous way.
sendRequest()  : ResponseInterface
Sends a PSR-7 request and returns a PSR-7 response.
chooseHttpClient()  : HttpClientPoolItem
Return an http client given a specific strategy.

Properties

$clientPool

protected array<string|int, HttpClientPoolItem> $clientPool = []

Methods

chooseHttpClient()

Return an http client given a specific strategy.

protected chooseHttpClient() : HttpClientPoolItem
Return values
HttpClientPoolItem

Return a http client that can do both sync or async


        
On this page

Search results