Skip to content

Commit

Permalink
build(deps): bump object_store from 0.5.6 to 0.6.1 (#2745)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Aug 1, 2023
1 parent 47faa77 commit ead90ca
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ version.workspace = true
async-trait = "0.1"
bytes = "1"
futures = "0.3"
object_store = "0.5"
object_store = "0.6"
opendal.workspace = true
tokio = "1"

Expand Down
13 changes: 13 additions & 0 deletions bindings/object_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use futures::stream::BoxStream;
use futures::Stream;
use futures::StreamExt;
use object_store::path::Path;
use object_store::GetOptions;
use object_store::GetResult;
use object_store::ListResult;
use object_store::MultipartId;
Expand Down Expand Up @@ -87,6 +88,16 @@ impl ObjectStore for OpendalStore {
})
}

async fn get_opts(&self, location: &Path, _: GetOptions) -> Result<GetResult> {
let r = self
.inner
.reader(location.as_ref())
.await
.map_err(|err| format_object_store_error(err, location.as_ref()))?;

Ok(GetResult::Stream(Box::pin(OpendalReader { inner: r })))
}

async fn get(&self, location: &Path) -> Result<GetResult> {
let r = self
.inner
Expand Down Expand Up @@ -118,6 +129,7 @@ impl ObjectStore for OpendalStore {
location: location.clone(),
last_modified: meta.last_modified().unwrap_or_default(),
size: meta.content_length() as usize,
e_tag: None,
})
}

Expand Down Expand Up @@ -243,6 +255,7 @@ fn format_object_meta(path: &str, meta: &Metadata) -> ObjectMeta {
location: path.into(),
last_modified: meta.last_modified().unwrap_or_default(),
size: meta.content_length() as usize,
e_tag: None,
}
}

Expand Down

0 comments on commit ead90ca

Please sign in to comment.