INNER CODE UNIT · Rust
build_object_store
splitgraph/seafowl · object_store_factory/src/lib.rs:80
pub fn build_object_store(
&self,
) -> Result<Arc<dyn ObjectStore>, object_store::Error> {
match self {
ObjectStoreConfig::Memory => memory::build_in_memory_storage(),
ObjectStoreConfig::Local(local_config) => local_config.build_local_storage(),
ObjectStoreConfig::AmazonS3(aws_config) => aws_config.build_amazon_s3(),
ObjectStoreConfig::GoogleCloudStorage(google_config) => {
google_config.build_google_cloud_storage()
}
}
}
pub fn build_storage_location_info(
&self,
) -> Result<StorageLocationInfo, object_store::Error> {
match self {
ObjectStoreConfig::AmazonS3(aws_config) => Ok(StorageLocationInfo {