class SqsConnector implements ConnectorInterface

Methods

connect(array $config)

Establish a queue connection.

array
getDefaultConfiguration(array $config)

Get the default configuration for SQS.

array
clientConfiguration(array $config)

Get the AWS client configuration for the given connection config.

array
withCredentials(array $config)

Configure the credentials for the given connection config.

mixed
resolveCredentialProvider(array $config)

Resolve a credential provider from the given config.

callable
cachedCredentialProvider(callable $provider, array $config)

Wrap the given credential provider so the credentials it resolves are shared across processes via the cache.

static string
credentialsCacheKey(array $config)

Get the cache key for the connection's shared credentials.

bool
credentialCachingEnabled(array $config)

Determine if resolved credentials should be shared across processes via the cache.

Details

at line 24
Queue connect(array $config)

Establish a queue connection.

Parameters

array $config

Return Value

Queue

at line 43
protected array getDefaultConfiguration(array $config)

Get the default configuration for SQS.

Parameters

array $config

Return Value

array

at line 74
protected array clientConfiguration(array $config)

Get the AWS client configuration for the given connection config.

Parameters

array $config

Return Value

array

at line 97
protected array withCredentials(array $config)

Configure the credentials for the given connection config.

Parameters

array $config

Return Value

array

Exceptions

InvalidArgumentException

at line 130
protected mixed resolveCredentialProvider(array $config)

Resolve a credential provider from the given config.

Parameters

array $config

Return Value

mixed

Exceptions

InvalidArgumentException

at line 160
protected callable cachedCredentialProvider(callable $provider, array $config)

Wrap the given credential provider so the credentials it resolves are shared across processes via the cache.

Parameters

callable $provider
array $config

Return Value

callable

at line 185
static string credentialsCacheKey(array $config)

Get the cache key for the connection's shared credentials.

The key is scoped to this host or container, because the role behind instance and container credentials is only known after fetching them, so identical settings on different machines may resolve different roles. Within that scope it separates the configured provider and the environment and configuration values that select its credentials. Secret values are hashed before they reach the key.

Parameters

array $config

Return Value

string

at line 259
protected bool credentialCachingEnabled(array $config)

Determine if resolved credentials should be shared across processes via the cache.

Parameters

array $config

Return Value

bool