azure-sdk-for-go icon indicating copy to clipboard operation
azure-sdk-for-go copied to clipboard

Ability to fetch blobs from a given timestamp

Open ShourieG opened this issue 2 years ago • 0 comments

Feature Request

The ability to fetch blobs based on timestamps would be a great addition to the current feature set of the sdk.

Currently if you use the ListBlobsFlat construct to fetch blob pagers and iterate on them , usually the blobs are ordered lexicographically.

A feature where we could construct a pager with a timestamp , similar to how we currently pass a marker & a prefix value would bring a lot of utility in building truly scalable applications which require time sorted blobs.

example : pager := client.ListBlobsFlat(&azblob.ContainerListBlobsFlatOptions{ Include: []azblob.ListBlobsIncludeItem{ azblob.ListBlobsIncludeItemMetadata, azblob.ListBlobsIncludeItemTags, }, TimeStamp: {{xyz}} <--- new atrribute })

The results of the pager would contain blobs whose LastModifiedOn timestamp is >= timestamp xyz . Similarly the page marker would also be updated.

This ability to pass timestamps to create pagers would make apps using polling operations on blobs , so much more efficient and scalable.

ShourieG avatar Aug 01 '22 07:08 ShourieG