Skip to main content

from_object_store

Function from_object_store 

Source
pub fn from_object_store(store: Arc<dyn ObjectStore>) -> Box<CloudBlobStore>
Expand description

Build a store from an already-constructed object_store::ObjectStore. The escape hatch when the *_from_env builders aren’t enough — pass anything object_store can build (custom endpoints, static credentials, retries, …).

ⓘ
use object_store::aws::AmazonS3Builder;
let s3 = AmazonS3Builder::new()
    .with_bucket_name("bucket")
    .with_endpoint("https://minio.internal:9000")
    .with_access_key_id("key")
    .with_secret_access_key("secret")
    .with_allow_http(true)
    .build()?;
let blobs = adminx_cloud::from_object_store(std::sync::Arc::new(s3));