Skip to main content

BundleUploader

Trait BundleUploader 

Source
pub trait BundleUploader:
    Send
    + Sync
    + Debug {
    // Required methods
    fn upload<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        bundle_path: &'life1 Path,
        opts: &'life2 UploadOptions,
    ) -> Pin<Box<dyn Future<Output = BundleUploadResult<UploadedBundle>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn refresh_url<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        object_ref: &'life1 str,
        opts: &'life2 UploadOptions,
    ) -> Pin<Box<dyn Future<Output = BundleUploadResult<UploadedBundle>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Cloud-agnostic interface for uploading a .gtbundle and producing a fetchable URL.

Implementors:

  • S3Uploader (feature bundle-upload-aws)
  • GcsUploader (feature bundle-upload-gcp, currently stub)
  • AzureUploader (feature bundle-upload-azure, currently stub)

Required Methods§

Source

fn upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bundle_path: &'life1 Path, opts: &'life2 UploadOptions, ) -> Pin<Box<dyn Future<Output = BundleUploadResult<UploadedBundle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Upload bundle_path. If an object with matching digest already exists at the target key, skip the byte upload and proceed to URL issuance.

Source

fn refresh_url<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, object_ref: &'life1 str, opts: &'life2 UploadOptions, ) -> Pin<Box<dyn Future<Output = BundleUploadResult<UploadedBundle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Re-issue a fresh URL for an existing uploaded bundle without re-uploading. object_ref is the value previously returned in UploadedBundle::object_ref.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§