-
Notifications
You must be signed in to change notification settings - Fork 510
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
new feature: Add if-match & if-none-match support for reader
#5426
Comments
reader
reader
Hi, I am trying to implement it. |
Thant's great! Since this will affect our public API, would you like to propose an RFC first? |
@Xuanwo hi, what do you mean by real reading IO? Because my understanding is that the current service backend already has this parameter, and the etag for multiple range requests is the same value.
|
Hi, I'm referring to the public API of opendal: |
|
I can currently only think of this method pub async fn read_with_etag(
&self,
range: impl RangeBounds<u64>,
etag: Option<&str>,
if_none_match: bool,
) -> Result<Buffer> { I wonder if there are any other ideas? |
Hi, @XmchxUp, I believe we need an approach to allow users to utilize different options simultaneously, including Maybe we can follow the same patten like let r = op.reader_with(path).version("version-id").await?;
let bs = r.read_with(0..1024).if_match("etag").if_modified_since(time).await?; |
Of course, you can help complete this RFC, my understanding may not be very clear. Thank you so much @Xuanwo @meteorgan . |
I'll submit a draft RFC in the next few days, and then we can complete it together. |
emmm, According to the design of opendal/core/src/types/read/reader.rs Lines 112 to 115 in 52c96bb
|
Feature Description
OpenDAL supports
read_with(path).if_match(etag)
but notreader_with(path).if_match(etag)
, it will be great if we can support it.Problem and Solution
reader
could read diffent range of file, so the etag may need to pass while perform real reading IO. The API should be carefully designed.Additional Context
No response
Are you willing to contribute to the development of this feature?
The text was updated successfully, but these errors were encountered: