You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/07/13 12:23:18 UTC

[GitHub] [incubator-opendal] Xuanwo commented on pull request #2634: add detect_region code for S3Builder

Xuanwo commented on PR #2634:
URL: https://github.com/apache/incubator-opendal/pull/2634#issuecomment-1634150493

   Thanks for the PR! Let me make the feature request more clear.
   
   As described in the issue, I want an API of `S3Builder` like `async fn detect_region(&self) -> Result<Option<String>>`, it's used to fetch `region` with input `endpoint` and `bucket`. (Maybe API should be `async fn detect_region(&self, endpoint: &str, bucket: &str)`?)
   
   The API should use the client in `S3Builder` to detect the region, the behavior will be similiar to
   
   https://github.com/apache/incubator-opendal/blob/44e93563227e58520f07e0ebcf3be14601b59d9a/src/services/s3/backend.rs#L504-L604
   
   The caller can use this function to detect region when they needed in async context. (Please note that `S3Builder::build` is blocking API, so we can't do this.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org