Skip to content

Commit

Permalink
Create build_storage_location_info_from_opts (#621)
Browse files Browse the repository at this point in the history
* Implement build_storage_location_info_from_opts

* Fix format
  • Loading branch information
lizardoluis authored Aug 21, 2024
1 parent 004955a commit b3a5918
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions object_store_factory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,14 @@ pub async fn build_object_store_from_opts(
}
}
}

pub async fn build_storage_location_info_from_opts(
url: &Url,
options: &HashMap<String, String>,
) -> Result<StorageLocationInfo, object_store::Error> {
Ok(StorageLocationInfo {
object_store: Arc::new(build_object_store_from_opts(url, options.clone()).await?),
options: options.clone(),
url: url.to_string(),
})
}

0 comments on commit b3a5918

Please sign in to comment.