Skip to content

Commit 55f8272

Browse files
authored
Add blob committed block count for append blobs. (#1324)
1 parent 8e7f3d4 commit 55f8272

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sdk/core/src/headers/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,5 @@ pub const WWW_AUTHENTICATE: HeaderName = HeaderName::from_static("www-authentica
364364
pub const ENCRYPTION_ALGORITHM: HeaderName = HeaderName::from_static("x-ms-encryption-algorithm");
365365
pub const ENCRYPTION_KEY: HeaderName = HeaderName::from_static("x-ms-encryption-key");
366366
pub const ENCRYPTION_KEY_SHA256: HeaderName = HeaderName::from_static("x-ms-encryption-key-sha256");
367+
pub const BLOB_COMMITTED_BLOCK_COUNT: HeaderName =
368+
HeaderName::from_static("x-ms-blob-committed-block-count");

sdk/storage_blobs/src/blob/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ pub struct BlobProperties {
173173
rename = "Expiry-Time"
174174
)]
175175
pub expiry_time: Option<OffsetDateTime>,
176+
pub blob_committed_block_count: Option<u64>,
176177
#[serde(flatten)]
177178
extra: HashMap<String, String>, // For debug purposes, should be compiled out in the future
178179
}
@@ -219,6 +220,7 @@ impl Blob {
219220
.and_then(|cct| date::parse_rfc1123(cct).ok());
220221
let copy_status_description = h.get_optional_string(&headers::COPY_STATUS_DESCRIPTION);
221222
let server_encrypted = h.get_as(&headers::SERVER_ENCRYPTED)?;
223+
let blob_committed_block_count = h.get_optional_as(&headers::BLOB_COMMITTED_BLOCK_COUNT)?;
222224

223225
let mut metadata = HashMap::new();
224226
for (name, value) in h.iter() {
@@ -279,6 +281,7 @@ impl Blob {
279281
tag_count: None, // TODO
280282
rehydrate_priority: None, // TODO
281283
expiry_time: None,
284+
blob_committed_block_count,
282285
extra: HashMap::new(),
283286
},
284287
metadata,

0 commit comments

Comments
 (0)