#5480 has implemented everything we need to context API. This issues is used to track the progress of migrating all services to context based.
The migration itself is simple, we just need to use the HttpClient fomr AccessorInfo instead of backend directly, for example:
diff --git a/core/src/services/s3/core.rs b/core/src/services/s3/core.rs
index d4375b520b6..173a33d50ef 100644
--- a/core/src/services/s3/core.rs
+++ b/core/src/services/s3/core.rs
@@ -101,7 +101,6 @@ pub struct S3Core {
pub signer: AwsV4Signer,
pub loader: Box<dyn AwsCredentialLoad>,
pub credential_loaded: AtomicBool,
- pub client: HttpClient,
pub checksum_algorithm: Option<ChecksumAlgorithm>,
}
@@ -198,7 +197,7 @@ impl S3Core {
#[inline]
pub async fn send(&self, req: Request<Buffer>) -> Result<Response<Buffer>> {
- self.client.send(req).await
+ self.info.http_client().send(req).await
}
/// # Note
@@ -503,7 +502,7 @@ impl S3Core {
self.sign(&mut req).await?;
- self.client.fetch(req).await
+ self.info.http_client().fetch(req).await
}
pub fn s3_put_object_request(
The whole change could be seen at #5676
All http based services will need this change.
Services
#5480 has implemented everything we need to context API. This issues is used to track the progress of migrating all services to context based.
The migration itself is simple, we just need to use the
HttpClientfomrAccessorInfoinstead of backend directly, for example:The whole change could be seen at #5676
All http based services will need this change.
Services