Skip to main content

Module provider

Module provider 

Source
Expand description

Backend implementations and the common provider interface.

Provider instances normalize paths, transfers, and optional URL signing across local and S3-compatible object stores. The module also owns backend construction and startup connectivity checks. Common interface over local and S3-compatible object stores.

Providers apply an optional base path, choose single-part or multipart uploads, and expose streaming reads and deletes. Backend failures are translated into the service’s shared error type.

Re-exportsΒ§

use std::iter::from_fn; πŸ”’
use std::iter::once; πŸ”’
use std::ops::Range; πŸ”’
use std::sync::Arc; πŸ”’
use std::time::Duration; πŸ”’
use bytes::Bytes; πŸ”’
use derive_more::Debug; πŸ”’
use futures::FutureExt; πŸ”’
use futures::Stream; πŸ”’
use futures::StreamExt; πŸ”’
use futures::TryFutureExt; πŸ”’
use futures::TryStreamExt; πŸ”’
use http::Method; πŸ”’
use object_store::signer::Signer; πŸ”’
use object_store::Attributes; πŸ”’
use object_store::CopyMode; πŸ”’
use object_store::DynObjectStore; πŸ”’
use object_store::GetResult; πŸ”’
use object_store::MultipartUpload; πŸ”’
use object_store::ObjectMeta; πŸ”’
use object_store::ObjectStore; πŸ”’
use object_store::ObjectStoreExt; πŸ”’
use object_store::PutPayload; πŸ”’
use object_store::PutResult; πŸ”’
use object_store::path::Path; πŸ”’
use tuwunel_core::Error; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::config::StorageProvider; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::err; πŸ”’
use tuwunel_core::error; πŸ”’
use tuwunel_core::error; πŸ”’
use tuwunel_core::error::error_chain; πŸ”’
use tuwunel_core::extract_variant; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::info; πŸ”’
use tuwunel_core::info; πŸ”’
use tuwunel_core::trace; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::result::FlatOk; πŸ”’
use tuwunel_core::utils::stream::IterStream; πŸ”’
use tuwunel_core::utils::stream::TryReadyExt; πŸ”’
use url::Url; πŸ”’

ModulesΒ§

gcs
Google Cloud Storage storage-provider construction.
local
Local-filesystem storage-provider construction.
s3
S3-compatible storage-provider construction.

StructsΒ§

Provider
One configured object-storage backend.

FunctionsΒ§

chunked πŸ”’
Splits a payload into nonempty parts no larger than part_size.

Type AliasesΒ§

FetchItem
One streamed object chunk with its returned range and complete object size.
FetchMetaItem
One streamed object chunk with shared response metadata and attributes.