EndpointDiscoveryMiddleware
in package
Table of Contents
- $args : mixed
- $cache : CacheInterface
- $client : mixed
- $config : mixed
- $discoveryCooldown : mixed
- $discoveryTimes : mixed
- $nextHandler : mixed
- $service : mixed
- __construct() : mixed
- __invoke() : mixed
- wrap() : mixed
- discoverEndpoint() : mixed
- getCacheKey() : mixed
- getDiscoveryCommand() : mixed
- getIdentifiers() : mixed
- handleDiscoveryException() : mixed
- handleInvalidEndpoint() : mixed
- modifyRequest() : mixed
- parseEndpoint() : array<string|int, mixed>
- Parses an endpoint returned from the discovery API into an array with 'host' and 'path' keys.
- useOriginalUri() : mixed
Properties
$args
private
mixed
$args
$cache
private
static CacheInterface
$cache
$client
private
mixed
$client
$config
private
mixed
$config
$discoveryCooldown
private
static mixed
$discoveryCooldown
= 60
$discoveryTimes
private
mixed
$discoveryTimes
= []
$nextHandler
private
mixed
$nextHandler
$service
private
mixed
$service
Methods
__construct()
public
__construct(callable $handler, AwsClient $client, array<string|int, mixed> $args, mixed $config) : mixed
Parameters
- $handler : callable
- $client : AwsClient
- $args : array<string|int, mixed>
- $config : mixed
Return values
mixed —__invoke()
public
__invoke(CommandInterface $cmd, RequestInterface $request) : mixed
Parameters
- $cmd : CommandInterface
- $request : RequestInterface
Return values
mixed —wrap()
public
static wrap(mixed $client, mixed $args, mixed $config) : mixed
Parameters
- $client : mixed
- $args : mixed
- $config : mixed
Return values
mixed —discoverEndpoint()
private
discoverEndpoint(mixed $cacheKey, CommandInterface $cmd, array<string|int, mixed> $identifiers) : mixed
Parameters
- $cacheKey : mixed
- $cmd : CommandInterface
- $identifiers : array<string|int, mixed>
Return values
mixed —getCacheKey()
private
getCacheKey(CredentialsInterface $creds, CommandInterface $cmd, array<string|int, mixed> $identifiers) : mixed
Parameters
- $creds : CredentialsInterface
- $cmd : CommandInterface
- $identifiers : array<string|int, mixed>
Return values
mixed —getDiscoveryCommand()
private
getDiscoveryCommand(CommandInterface $cmd, array<string|int, mixed> $identifiers) : mixed
Parameters
- $cmd : CommandInterface
- $identifiers : array<string|int, mixed>
Return values
mixed —getIdentifiers()
private
getIdentifiers(array<string|int, mixed> $operation) : mixed
Parameters
- $operation : array<string|int, mixed>
Return values
mixed —handleDiscoveryException()
private
handleDiscoveryException(mixed $isRequired, mixed $originalUri, Exception $e, CommandInterface $cmd, RequestInterface $request) : mixed
Parameters
- $isRequired : mixed
- $originalUri : mixed
- $e : Exception
- $cmd : CommandInterface
- $request : RequestInterface
Return values
mixed —handleInvalidEndpoint()
private
handleInvalidEndpoint(mixed $cacheKey, mixed $cmd, mixed $identifiers, mixed $isRequired, mixed $originalUri, mixed $request, mixed $value, mixed &$endpoint, mixed &$g) : mixed
Parameters
- $cacheKey : mixed
- $cmd : mixed
- $identifiers : mixed
- $isRequired : mixed
- $originalUri : mixed
- $request : mixed
- $value : mixed
- $endpoint : mixed
- $g : mixed
Return values
mixed —modifyRequest()
private
modifyRequest(RequestInterface $request, mixed $endpoint) : mixed
Parameters
- $request : RequestInterface
- $endpoint : mixed
Return values
mixed —parseEndpoint()
Parses an endpoint returned from the discovery API into an array with 'host' and 'path' keys.
private
parseEndpoint( $endpoint) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —useOriginalUri()
private
useOriginalUri(UriInterface $uri, CommandInterface $cmd, RequestInterface $request) : mixed
Parameters
- $uri : UriInterface
- $cmd : CommandInterface
- $request : RequestInterface