Download the PHP package flyokai/amp-opensearch without Composer
On this page you can find all versions of the php package flyokai/amp-opensearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download flyokai/amp-opensearch
More information about flyokai/amp-opensearch
Files in flyokai/amp-opensearch
Download flyokai/amp-opensearch
More information about flyokai/amp-opensearch
Files in flyokai/amp-opensearch
Vendor flyokai
Package amp-opensearch
Short Description opensearch client connection handler backed with amphp/http-client
License MIT
Package amp-opensearch
Short Description opensearch client connection handler backed with amphp/http-client
License MIT
Please rate this library. Is it a good library?
Informations about the package amp-opensearch
flyokai/amp-opensearch
User docs →
AGENTS.mdAsync OpenSearch client for PHP — bridges the official
opensearch-project/opensearch-phpSDK with AMPHP's non-blocking HTTP client.
Drops in as a custom request handler so you can keep using the official SDK API while every call is non-blocking under Revolt.
Features
AmpHandler— callable handler forOpenSearch\ClientBuilder::setHandler()HttpClientBuilder— configured AMPHPHttpClientwith connection pooling- Configurable retry (limit + delay)
- Returns
Guzzle\CompletedFutureArray(the format the SDK expects)
Installation
Quick start
Every call inside fibers is fully non-blocking — the SDK doesn't know.
Architecture
AmpHandler::__invoke(array $request) is invoked by the OpenSearch SDK for every operation. It:
- Translates the SDK request array into an AMPHP
Request - Executes via the configured
HttpClient - Wraps the response as
CompletedFutureArraywith:status,reason,headers,body(php://memory),effective_url,transfer_stats,error - Retries up to
retryLimittimes withretryDelaybetween attempts on failure
HttpClientBuilder::build() returns an AMPHP HttpClient with:
- TLS without peer verification (development default)
UnlimitedConnectionPoolDefaultConnectionFactory+ConnectContext
Gotchas
- SSL verification disabled by default.
HttpClientBuildercallswithoutPeerVerification(). Review for production. - Hard-coded JSON headers.
Content-TypeandAcceptare alwaysapplication/json. Not customizable per request. - Memory stream for responses —
php://memory. No streaming. transfer_statsis incomplete —total_timeis hardcoded to 0.- Requires Revolt event loop context — retry delays use
EventLoop::delay()+ suspension. Will fail outside fibers.
See also
flyokai/indexer— uses this for indexing operations.
License
MIT
All versions of amp-opensearch with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
amphp/http-client Version ^5.1
opensearch-project/opensearch-php Version ^2.3
amphp/http-client Version ^5.1
opensearch-project/opensearch-php Version ^2.3
The package flyokai/amp-opensearch contains the following files
Loading the files please wait ...