Download the PHP package arntech/guzzle-pool-client without Composer
On this page you can find all versions of the php package arntech/guzzle-pool-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arntech/guzzle-pool-client
More information about arntech/guzzle-pool-client
Files in arntech/guzzle-pool-client
Package guzzle-pool-client
Short Description ARNTech guzzle pool.
License GPL-3.0-only
Informations about the package guzzle-pool-client
arntech/guzzle-pool-client
What is this?
This is a library that implements multiple (hopefully in the future will be more than one) pool types for the Guzzle client. For the moment, the focus was on using a non locked pool that enables a better async schedule for the remote calls.
What does that mean?
Guzzle by default has blocking pools. They do not accept newer requests after you call $promise->wait(). The problem with that is if you need to make new calls based on the response from the old calls. For this, one should (traditionally) wait for the current request queue to settle.
Installation
The preferred method of installation is via [Composer][]. Run the following
command to install the package and add it as a requirement to your project's
composer.json
:
Usage
Create a new Pool
Create a client
DynamicPoolClient extends GuzzleHttp\Client. The constructor accepts all GuzzleHttp\Client arguments plus pool or __pool_size__. DynamicUniquePoolClient is a client that requires and uses DynamicUniquePool this pool ensures that any consecutive requests are executed only once. This is achieved by setting a key (for example a hash between url and requested arguments).
Example
1. DynamicPoolClient
2. DynamicUniquePoolClient
All versions of guzzle-pool-client with dependencies
ext-json Version *
guzzlehttp/guzzle Version >=6 <7
arntech/utils Version >=0.0.2