You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "acehinnnqru (via GitHub)" <gi...@apache.org> on 2023/11/10 02:05:11 UTC

[PR] refactor(services/azblob): add AzblobConfig [incubator-opendal]

acehinnnqru opened a new pull request, #3553:
URL: https://github.com/apache/incubator-opendal/pull/3553

   Impl Azblob support for #3240 .


-- 
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


Re: [PR] refactor(services/azblob): add AzblobConfig [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #3553:
URL: https://github.com/apache/incubator-opendal/pull/3553


-- 
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


Re: [PR] refactor(services/azblob): add AzblobConfig [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #3553:
URL: https://github.com/apache/incubator-opendal/pull/3553#discussion_r1388791880


##########
core/src/services/azblob/backend.rs:
##########
@@ -53,25 +54,23 @@ const KNOWN_AZBLOB_ENDPOINT_SUFFIX: &[&str] = &[
 
 const AZBLOB_BATCH_LIMIT: usize = 256;
 /// Azure Storage Blob services support.
-#[doc = include_str!("docs.md")]
-#[derive(Default, Clone)]
-pub struct AzblobBuilder {
-    root: Option<String>,
-    container: String,
-    endpoint: Option<String>,
-    account_name: Option<String>,
-    account_key: Option<String>,
-    encryption_key: Option<String>,
-    encryption_key_sha256: Option<String>,
-    encryption_algorithm: Option<String>,
-    sas_token: Option<String>,
-    http_client: Option<HttpClient>,
-    batch_max_operations: Option<usize>,
+#[derive(Default, Deserialize, Clone)]
+pub struct AzblobConfig {
+    pub root: Option<String>,

Review Comment:
   Please add comments for all those fields.



##########
core/src/services/azblob/backend.rs:
##########
@@ -53,25 +54,23 @@ const KNOWN_AZBLOB_ENDPOINT_SUFFIX: &[&str] = &[
 
 const AZBLOB_BATCH_LIMIT: usize = 256;
 /// Azure Storage Blob services support.
-#[doc = include_str!("docs.md")]
-#[derive(Default, Clone)]
-pub struct AzblobBuilder {
-    root: Option<String>,
-    container: String,
-    endpoint: Option<String>,
-    account_name: Option<String>,
-    account_key: Option<String>,
-    encryption_key: Option<String>,
-    encryption_key_sha256: Option<String>,
-    encryption_algorithm: Option<String>,
-    sas_token: Option<String>,
-    http_client: Option<HttpClient>,
-    batch_max_operations: Option<usize>,
+#[derive(Default, Deserialize, Clone)]
+pub struct AzblobConfig {
+    pub root: Option<String>,
+    pub container: String,
+    pub endpoint: Option<String>,
+    pub account_name: Option<String>,
+    pub account_key: Option<String>,
+    pub encryption_key: Option<String>,
+    pub encryption_key_sha256: Option<String>,
+    pub encryption_algorithm: Option<String>,
+    pub sas_token: Option<String>,
+    pub batch_max_operations: Option<usize>,
 }
 
-impl Debug for AzblobBuilder {
+impl Debug for AzblobConfig {
     fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        let mut ds = f.debug_struct("Builder");
+        let mut ds = f.debug_struct("Config");

Review Comment:
   We can use `AzblobConfig` here.



-- 
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