abstract class
Awscr::S3::HttpClientFactory
- Awscr::S3::HttpClientFactory
- Reference
- Object
Overview
Abstract factory for providing configured HTTP::Client
instances used to
communicate with AWS S3. This allows different implementations to manage
client lifecycle — such as creating a new client per request, reusing a persistent
connection, or implementing client pooling.
Direct Known Subclasses
Defined in:
awscr-s3/http_client_factory/http_client_factory.crInstance 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
. -
#release(client : HTTP::Client | Nil)
Releases the given HTTP client.
Instance Method Detail
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.
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.
Releases the given HTTP client. This is called when the client is no longer needed.