| Methods |
public
|
__construct(int $retries, AbstractConnectionPool $connectionPool, LoggerInterface $log, bool $sniffOnStart = false)
Transport class is responsible for dispatching requests to the
underlying cluster connections
Transport class is responsible for dispatching requests to the
underlying cluster connections
Parameters
| $log |
Monolog logger object
|
|
#
|
public
|
getConnection(): ConnectionInterface
Returns a single connection from the connection pool
Potentially performs a sniffing step before returning
Returns a single connection from the connection pool
Potentially performs a sniffing step before returning
|
#
|
public
|
performRequest(
string $method,
string $uri,
array<string, mixed> $params = [],
mixed|null $body = null,
array $options = [],
): FutureArrayInterface
Perform a request to the Cluster
Perform a request to the Cluster
Parameters
| $method |
HTTP method to use
|
| $uri |
HTTP URI to send request to
|
| $params |
Optional query parameters
|
| $body |
Optional query body
|
Throws
|
#
|
public
|
resultOrFuture(FutureArrayInterface $result, array $options = []): callable|array
Parameters
| $result |
Response of a request (promise)
|
| $options |
Options for transport
|
|
#
|
public
|
shouldRetry(array $request): bool
|
#
|
public
|
getLastConnection(): ConnectionInterface
Returns the last used connection so that it may be inspected. Mainly
for debugging/testing purposes.
Returns the last used connection so that it may be inspected. Mainly
for debugging/testing purposes.
|
#
|