-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move storage blobs to pipeline architecture #843
Move storage blobs to pipeline architecture #843
Conversation
Changes beyond the into_future pattern updates: 1. This updates ContentDisposition, ContentEncoding, ContentLanguage, and ContentType to follow other header types. 2. This adds a `BlobClient.get_content` helper that iterates over `BlobClient.get().stream()` and writes the data into a single Vec, returning the Vec. This was an extremely common pattern in the examples and something akin to it is available in most of the other SDKs as well. TODO: * move container operations to the into_future model
Note, this does not move |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed together with @yoshuawuyts 🧡
There are some small things that we think we should change, but feel free to do those in a follow up PR if you want.
use azure_core::{ | ||
auth::TokenCredential, | ||
error::{Error, ErrorKind, ResultExt}, | ||
headers::*, | ||
ClientOptions, Context, HttpClient, Pipeline, Request, Response, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we don't seem to have a consistent way of structuring imports. I'd like to figure out a consistent way of structuring these things and stick to that across all of the SDKs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, preferably using imports_granularity once it stabilizes.
let storage_account_client = | ||
StorageAccountClient::new_access_key(http_client, &account, &account_key); | ||
|
||
let blob_service_client = storage_account_client.as_blob_service_client(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Cosmos, we would use the naming convention storage_account_client.blob_client()
. This was discussed in a previous PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this change as a follow-up PR, as I'd like feedback on it uniquely.
No description provided.