class
EasyAwscr::S3::Internals::ConnectionPool
- EasyAwscr::S3::Internals::ConnectionPool
- Awscr::S3::HttpClientFactory
- Reference
- Object
Defined in:
easy-awscr/s3/internals/connection_pool.crConstructors
Instance Method Summary
-
#acquire_client(endpoint : URI, signer : Awscr::Signer::Signers::Interface) : HTTP::Client
Acquires a fully configured
HTTP::Client
, with the signer attached. -
#acquire_raw_client(endpoint : URI) : HTTP::Client
Acquires a raw
HTTP::Client
for the givenendpoint
andsigner
. - #close
- #created_at : Time
-
#release(client : HTTP::Client | Nil)
Releases the given HTTP client.
Constructor Detail
Instance Method Detail
def acquire_client(endpoint : URI, signer : Awscr::Signer::Signers::Interface) : HTTP::Client
#
Description copied from class Awscr::S3::HttpClientFactory
Acquires a fully configured HTTP::Client
, with the signer attached.
Calls #acquire_raw_client
internally to retrieve a client and automatically
attaches a signing hook using the provided signer
.
Override this method if you need custom logic beyond standard signing.
def acquire_raw_client(endpoint : URI) : HTTP::Client
#
Description copied from class Awscr::S3::HttpClientFactory
Acquires a raw HTTP::Client
for the given endpoint
and signer
.
Subclasses must implement this method to construct or retrieve a client instance. The returned client is not expected to have a signing hook attached yet.
def release(client : HTTP::Client | Nil)
#
Description copied from class Awscr::S3::HttpClientFactory
Releases the given HTTP client. This is called when the client is no longer needed.